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:
Hiltjo Posthuma 2014-03-15 19:47:18 +01:00 committed by sin
parent bd994c3a50
commit 023c8e0414
1 changed files with 4 additions and 2 deletions

View File

@ -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;