aboutsummaryrefslogtreecommitdiff
path: root/umount.c
diff options
context:
space:
mode:
Diffstat (limited to 'umount.c')
-rw-r--r--umount.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/umount.c b/umount.c
index 92eb0a61a..ad7de2d20 100644
--- a/umount.c
+++ b/umount.c
@@ -37,9 +37,7 @@ static const char umount_usage[] =
37#else 37#else
38 "\n" 38 "\n"
39#endif 39#endif
40#ifdef BB_FEATURE_REMOUNT
41 "\t-r:\tTry to remount devices as read-only if mount is busy\n" 40 "\t-r:\tTry to remount devices as read-only if mount is busy\n"
42#endif
43#if defined BB_FEATURE_MOUNT_LOOP 41#if defined BB_FEATURE_MOUNT_LOOP
44 "\t-f:\tDo not free loop device (if a loop device has been used)\n" 42 "\t-f:\tDo not free loop device (if a loop device has been used)\n"
45#endif 43#endif
@@ -60,9 +58,7 @@ static int freeLoop = TRUE;
60#endif 58#endif
61static int useMtab = TRUE; 59static int useMtab = TRUE;
62static int umountAll = FALSE; 60static int umountAll = FALSE;
63#if defined BB_FEATURE_REMOUNT
64static int doRemount = FALSE; 61static int doRemount = FALSE;
65#endif
66extern const char mtab_file[]; /* Defined in utility.c */ 62extern const char mtab_file[]; /* Defined in utility.c */
67 63
68 64
@@ -180,7 +176,6 @@ static int do_umount(const char *name, int useMtab)
180 /* this was a loop device, delete it */ 176 /* this was a loop device, delete it */
181 del_loop(blockDevice); 177 del_loop(blockDevice);
182#endif 178#endif
183#if defined BB_FEATURE_REMOUNT
184 if (status != 0 && doRemount == TRUE && errno == EBUSY) { 179 if (status != 0 && doRemount == TRUE && errno == EBUSY) {
185 status = mount(blockDevice, name, NULL, 180 status = mount(blockDevice, name, NULL,
186 MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL); 181 MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL);
@@ -193,7 +188,6 @@ static int do_umount(const char *name, int useMtab)
193 blockDevice); 188 blockDevice);
194 } 189 }
195 } 190 }
196#endif
197 if (status == 0) { 191 if (status == 0) {
198#if defined BB_MTAB 192#if defined BB_MTAB
199 if (useMtab == TRUE) 193 if (useMtab == TRUE)
@@ -255,11 +249,9 @@ extern int umount_main(int argc, char **argv)
255 useMtab = FALSE; 249 useMtab = FALSE;
256 break; 250 break;
257#endif 251#endif
258#ifdef BB_FEATURE_REMOUNT
259 case 'r': 252 case 'r':
260 doRemount = TRUE; 253 doRemount = TRUE;
261 break; 254 break;
262#endif
263 case 'v': 255 case 'v':
264 break; /* ignore -v */ 256 break; /* ignore -v */
265 default: 257 default: