bootspec: split out code that validates whether directory is top-level dir of fs
Let's add a new function that checks whether some directory is the top-level directory inside an fs, splitting out the code for this from verify_esp(). While we are at it, let's slightly improve the code, so that we can correctly work if we have no priviliges but the ESP is mounted unaccessible: if we can't stat() the path "$ESP/.." then manually remove the last component of $ESP and check that instead. Which is very similar in behaviour, and hopefully good enough in the unprivileged case.
Loading
Please register or sign in to comment