[hackers] [ubase] mount: use mount error status code when mount failed || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Sat, 15 Mar 2014 20:30:24 +0100

commit 023c8e0414c281a2569b34ace267224b55c6a00e
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sat Mar 15 19:47:18 2014 +0100

    mount: use mount error status code when mount failed
    
    this matches other mount implementations
    
    Signed-off-by: Hiltjo Posthuma <hiltjo_AT_codemadness.org>

diff --git a/mount.c b/mount.c
index eda60ee..0f6bdc5 100644
--- a/mount.c
+++ b/mount.c
_AT_@ -155,8 +155,10 @@ main(int argc, char *argv[])
                 eprintf("can't find %s in /etc/fstab
", target);
 
 mountsingle:
- if(mount(source, target, types, flags, data) < 0)
- eprintf("mount: %s:", source);
+ if(mount(source, target, types, flags, data) < 0) {
+ weprintf("mount: %s:", source);
+ status = 32; /* all failed */
+ }
         if(fp)
                 endmntent(fp);
         return status;
Received on Sat Mar 15 2014 - 20:30:24 CET

This archive was generated by hypermail 2.3.0 : Sat Mar 15 2014 - 20:36:30 CET