mirror of git://git.suckless.org/sbase
mount: use mount error status code when mount failed
this matches other mount implementations Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
This commit is contained in:
parent
bd994c3a50
commit
023c8e0414
6
mount.c
6
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;
|
||||
|
|
Loading…
Reference in New Issue