commit 023c8e0414c281a2569b34ace267224b55c6a00e
Author: Hiltjo Posthuma <[email protected]>
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 <[email protected]>

diff --git a/mount.c b/mount.c
index eda60ee..0f6bdc5 100644
--- a/mount.c
+++ b/mount.c
@@ -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;


Reply via email to