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:
Leah Rowe
2026-03-03 04:17:25 +00:00
parent c64324467f
commit 188a3d012b
+2 -4
View File
@@ -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