[hackers] [ubase] mount: use simple error status codes for now || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Sat, 22 Mar 2014 23:18:49 +0100

commit f1a747a0ca5bb8526bad40b24ca4d2f4b12c5ba7
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sat Mar 22 11:49:57 2014 +0100

    mount: use simple error status codes for now
    
    Signed-off-by: Hiltjo Posthuma <hiltjo_AT_codemadness.org>

diff --git a/mount.c b/mount.c
index ea33125..df82109 100644
--- a/mount.c
+++ b/mount.c
_AT_@ -182,7 +182,7 @@ main(int argc, char *argv[])
 mountsingle:
         if(mount(source, target, types, flags, data) < 0) {
                 weprintf("mount: %s:", source);
- status = 32; /* all failed */
+ status = EXIT_FAILURE;
         }
         if(fp)
                 endmntent(fp);
_AT_@ -195,12 +195,10 @@ mountall:
                 flags = 0;
                 parseopts(me->mnt_opts, &flags, data, datasiz);
                 if(mount(me->mnt_fsname, me->mnt_dir, me->mnt_type, flags, data) < 0) {
- if (mounted(me->mnt_dir) == 0)
+ if(mounted(me->mnt_dir) == 0) {
                                 weprintf("mount: %s:", me->mnt_fsname);
- if(status != 64)
- status = 32; /* all failed */
- } else {
- status = 64; /* some failed */
+ status = EXIT_FAILURE;
+ }
                 }
         }
         endmntent(fp);
Received on Sat Mar 22 2014 - 23:18:49 CET

This archive was generated by hypermail 2.3.0 : Sat Mar 22 2014 - 23:24:13 CET