mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
util/nvmutil: clean up checkdir
those lines at the end are a hangover from the old opendir- based implementation. i also made the output more verbose in that first error check. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -166,12 +166,10 @@ void
|
||||
checkdir(const char *path)
|
||||
{
|
||||
struct stat st;
|
||||
err_if (stat(path, &st) == -1);
|
||||
if (stat(path, &st) == -1)
|
||||
err(set_err(ECANCELED), "%s", path);
|
||||
if (S_ISDIR(st.st_mode))
|
||||
err(set_err(EISDIR), "%s", path);
|
||||
if (errno == ENOTDIR)
|
||||
errno = 0;
|
||||
err_if(errno);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user