diff options
author | Karel Zak | 2009-02-18 16:10:45 +0100 |
---|---|---|
committer | Karel Zak | 2009-02-18 16:10:45 +0100 |
commit | 355eceba7ef60805123fad0bdcc69996891537be (patch) | |
tree | a0de2c64db7e4d9010db9e2953f78443e1289077 /lib | |
parent | lib: add test_ismounted for regression test (diff) | |
download | kernel-qcow2-util-linux-355eceba7ef60805123fad0bdcc69996891537be.tar.gz kernel-qcow2-util-linux-355eceba7ef60805123fad0bdcc69996891537be.tar.xz kernel-qcow2-util-linux-355eceba7ef60805123fad0bdcc69996891537be.zip |
tests: add fsck:ismounted reg.test
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ismounted.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/ismounted.c b/lib/ismounted.c index 79a1df6a1..0481c77e4 100644 --- a/lib/ismounted.c +++ b/lib/ismounted.c @@ -190,11 +190,14 @@ int main(int argc, char **argv) { if (argc < 2) { fprintf(stderr, "Usage: %s device\n", argv[0]); - exit(1); + return EXIT_FAILURE; } - if (is_mounted(argv[1])) - printf("\t%s is mounted.\n", argv[1]); - exit(0); + if (is_mounted(argv[1])) { + printf("mounted\n"); + return EXIT_SUCCESS; + } + printf("not mounted\n"); + return EXIT_FAILURE; } #endif /* DEBUG */ |