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 <[email protected]>
---
misc/e4crypt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc/e4crypt.c b/misc/e4crypt.c
index 67d25d88..af907041 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;
}
}
--
2.39.2
On Wed, 27 Dec 2023 09:08:05 +0100, Jakub Wilk wrote:
> Before:
>
> # e4crypt set_policy 0000000000000000 /dev/null
> /dev/null is not a directory
> /dev/null: Success
>
> After:
>
> [...]
Applied, thanks!
[1/1] e4crypt: fix spurious "Success" error message
commit: 1275bbaaea7ffd42346789f945c2f4dcddbfbbc8
Best regards,
--
Theodore Ts'o <[email protected]>