Whamcloud - gitweb
e4defrag: avoid unsuccessful return for an non-privileged user
authorKazuya Mio <k-mio@sx.jp.nec.com>
Mon, 13 Dec 2010 14:59:07 +0000 (09:59 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 13 Dec 2010 14:59:07 +0000 (09:59 -0500)
If non-privileged user runs e4defrag, e4defrag returns an exit status
of 1 despite its success. This patch fixes this problem.

Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/e4defrag.c

index 8659d97..83625fc 100644 (file)
@@ -2034,6 +2034,7 @@ int main(int argc, char *argv[])
                                if (!(mode_flag & DETAIL) &&
                                                current_uid != ROOT_UID) {
                                        printf(" Done.\n");
+                                       success_flag = 1;
                                        continue;
                                }