diff options
author | Jakub Wilk <jwilk@jwilk.net> | 2023-12-27 09:08:05 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2024-04-17 00:35:33 -0400 |
commit | 1275bbaaea7ffd42346789f945c2f4dcddbfbbc8 (patch) | |
tree | b9c870fe13038f33ca3543f1039ae79cc8ea22e0 | |
parent | 272173a300822b5cfe19bef597609523baab0c66 (diff) | |
download | e2fsprogs-1275bbaaea7ffd42346789f945c2f4dcddbfbbc8.tar.gz |
e4crypt: fix spurious "Success" error message
Before:
# e4crypt set_policy 0000000000000000 /dev/null
/dev/null is not a directory
/dev/null: Success
After:
# e4crypt set_policy 0000000000000000 /dev/null
/dev/null: Not a directory
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Link: https://lore.kernel.org/r/20231227080805.6801-1-jwilk@jwilk.net
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | misc/e4crypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/e4crypt.c b/misc/e4crypt.c index 67d25d88d..af907041c 100644 --- a/misc/e4crypt.c +++ b/misc/e4crypt.c @@ -144,7 +144,7 @@ static void validate_paths(int argc, char *argv[], int path_start_index) if (ret < 0) goto invalid; if (!S_ISDIR(st.st_mode)) { - fprintf(stderr, "%s is not a directory\n", argv[x]); + errno = ENOTDIR; goto invalid; } } |