diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-03 04:17:25 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-03 04:17:25 +0000 |
| commit | 188a3d012b64e77e2ed4ac0ec50e38be3889a00d (patch) | |
| tree | bdfb9d8aa62512efecd897afa9784b28a30ea88f | |
| parent | c64324467f412f5c9abf89ee22fbf6796f556273 (diff) | |
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>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 87a20bd0..e60501ab 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -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 |
