ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit 023c8e0414c281a2569b34ace267224b55c6a00e
parent bd994c3a507a326c95b04263be7d68ffce3f6409
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 15 Mar 2014 19:47:18 +0100

mount: use mount error status code when mount failed

this matches other mount implementations

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Mmount.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/mount.c b/mount.c @@ -155,8 +155,10 @@ main(int argc, char *argv[]) eprintf("can't find %s in /etc/fstab\n", 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;