diff options
| author | Eric Andersen <andersen@codepoet.org> | 2000-12-12 23:20:37 +0000 |
|---|---|---|
| committer | Eric Andersen <andersen@codepoet.org> | 2000-12-12 23:20:37 +0000 |
| commit | d9d03b83f861c814bbbdbed50d07429a513949bb (patch) | |
| tree | 6a7e9e91b5f6492da2a69d2d70ff625644568635 /util-linux | |
| parent | b12e506d8d0f3c8551bb1fed3234602f11b7b3fe (diff) | |
| download | busybox-w32-d9d03b83f861c814bbbdbed50d07429a513949bb.tar.gz busybox-w32-d9d03b83f861c814bbbdbed50d07429a513949bb.tar.bz2 busybox-w32-d9d03b83f861c814bbbdbed50d07429a513949bb.zip | |
Mount error return code fix from Kent Robotti -- we must reset the error
code when looping...
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/mount.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index fa998122b..06673f942 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
| @@ -132,12 +132,10 @@ do_mount(char *specialfile, char *dir, char *filesystemtype, | |||
| 132 | 132 | ||
| 133 | specialfile = find_unused_loop_device(); | 133 | specialfile = find_unused_loop_device(); |
| 134 | if (specialfile == NULL) { | 134 | if (specialfile == NULL) { |
| 135 | error_msg("Could not find a spare loop device\n"); | 135 | error_msg_and_die("Could not find a spare loop device\n"); |
| 136 | return (FALSE); | ||
| 137 | } | 136 | } |
| 138 | if (set_loop(specialfile, lofile, 0, &loro)) { | 137 | if (set_loop(specialfile, lofile, 0, &loro)) { |
| 139 | error_msg("Could not setup loop device\n"); | 138 | error_msg_and_die("Could not setup loop device\n"); |
| 140 | return (FALSE); | ||
| 141 | } | 139 | } |
| 142 | if (!(flags & MS_RDONLY) && loro) { /* loop is ro, but wanted rw */ | 140 | if (!(flags & MS_RDONLY) && loro) { /* loop is ro, but wanted rw */ |
| 143 | error_msg("WARNING: loop device is read-only\n"); | 141 | error_msg("WARNING: loop device is read-only\n"); |
| @@ -481,6 +479,7 @@ extern int mount_main(int argc, char **argv) | |||
| 481 | directory = strdup(m->mnt_dir); | 479 | directory = strdup(m->mnt_dir); |
| 482 | filesystemType = strdup(m->mnt_type); | 480 | filesystemType = strdup(m->mnt_type); |
| 483 | singlemount: | 481 | singlemount: |
| 482 | rc = EXIT_SUCCESS; | ||
| 484 | #ifdef BB_NFSMOUNT | 483 | #ifdef BB_NFSMOUNT |
| 485 | if (strchr(device, ':') != NULL) | 484 | if (strchr(device, ':') != NULL) |
| 486 | filesystemType = "nfs"; | 485 | filesystemType = "nfs"; |
| @@ -499,8 +498,6 @@ singlemount: | |||
| 499 | 498 | ||
| 500 | if (all == FALSE) | 499 | if (all == FALSE) |
| 501 | break; | 500 | break; |
| 502 | |||
| 503 | rc = EXIT_SUCCESS; // Always return 0 for 'all' | ||
| 504 | } | 501 | } |
| 505 | if (fstabmount == TRUE) | 502 | if (fstabmount == TRUE) |
| 506 | endmntent(f); | 503 | endmntent(f); |
