diff --git a/src/bin/mount.c b/src/bin/mount.c index f61d344111..50885f56c1 100644 --- a/src/bin/mount.c +++ b/src/bin/mount.c @@ -21,7 +21,7 @@ usage(const char *programName) printf("usage: %s [-ro] [-t fstype] [-p parameter] device directory\n" "\t-ro\tmounts the volume read-only\n" "\t-t\tspecifies the file system to use (defaults to automatic recognition)\n",programName); - exit(0); + exit(1); } @@ -75,11 +75,11 @@ main(int argc, char **argv) if (stat(mountPoint, &mountStat) < 0) { fprintf(stderr, "%s: The mount point '%s' is not accessible\n", programName, mountPoint); - return -1; + return 1; } if (!S_ISDIR(mountStat.st_mode)) { fprintf(stderr, "%s: The mount point '%s' is not a directory\n", programName, mountPoint); - return -1; + return 1; } /* do the work */ @@ -87,7 +87,7 @@ main(int argc, char **argv) volume = fs_mount_volume(mountPoint, device, fs, flags, parameter); if (volume < B_OK) { fprintf(stderr, "%s: %s\n", programName, strerror(volume)); - return -1; + return 1; } return 0; } diff --git a/src/bin/unmount.c b/src/bin/unmount.c index b26d05a22e..1ad484022e 100644 --- a/src/bin/unmount.c +++ b/src/bin/unmount.c @@ -20,7 +20,7 @@ usage(const char *programName) printf("usage: %s [-f] \n" "\t-f\tforces unmounting in case of open files left\n", programName); - exit(0); + exit(1); } @@ -60,7 +60,7 @@ main(int argc, char **argv) if (stat(path, &pathStat) < 0) { fprintf(stderr, "%s: The path \"%s\" is not accessible\n", programName, path); - return -1; + return 1; } /* do the work */ @@ -68,7 +68,7 @@ main(int argc, char **argv) status = fs_unmount_volume(path, flags); if (status != B_OK) { fprintf(stderr, "%s: unmounting failed: %s\n", programName, strerror(status)); - return -1; + return 1; } return 0;