aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-12-12 23:20:37 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-12-12 23:20:37 +0000
commit0a6dd392bca29b276b6ed3a2662b499211d0b51e (patch)
tree6a7e9e91b5f6492da2a69d2d70ff625644568635 /util-linux
parent5e037507ad611456f17bd9643974dae4cb49f802 (diff)
downloadbusybox-w32-0a6dd392bca29b276b6ed3a2662b499211d0b51e.tar.gz
busybox-w32-0a6dd392bca29b276b6ed3a2662b499211d0b51e.tar.bz2
busybox-w32-0a6dd392bca29b276b6ed3a2662b499211d0b51e.zip
Mount error return code fix from Kent Robotti -- we must reset the error
code when looping... git-svn-id: svn://busybox.net/trunk/busybox@1437 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mount.c9
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);
483singlemount: 481singlemount:
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);