diff options
Diffstat (limited to 'util')
| -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 |
