From 023c8e0414c281a2569b34ace267224b55c6a00e Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 15 Mar 2014 19:47:18 +0100 Subject: [PATCH] mount: use mount error status code when mount failed this matches other mount implementations Signed-off-by: Hiltjo Posthuma --- mount.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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\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;