]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mount.ceph: exit with error code from mount
authorPaul Chiang <paul_chiang@tcloudcomputing.com>
Tue, 13 Jul 2010 05:50:23 +0000 (13:50 +0800)
committerSage Weil <sage@newdream.net>
Thu, 9 Sep 2010 22:18:40 +0000 (15:18 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/mount/mount.ceph.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 7d1a892..20857b4
@@ -309,6 +309,7 @@ int main(int argc, char *argv[])
        char **new_argv;
        int flags = 0;
        int options_pos = 0;
+       int retval = 0;
 
        if (argc < 5)
                exit(1);
@@ -335,6 +336,7 @@ int main(int argc, char *argv[])
        block_signals(SIG_BLOCK);
 
        if (mount(new_argv[1], new_argv[2], "ceph", flags, new_argv[options_pos])) {
+               retval = errno;
                switch (errno) {
                case ENODEV:
                        printf("mount error: ceph filesystem not supported by the system\n");
@@ -349,6 +351,6 @@ int main(int argc, char *argv[])
        block_signals(SIG_UNBLOCK);
 
        free(new_argv); 
-       exit(0);
+       exit(retval);
 }