-#if defined BB_FEATURE_MOUNT_LOOP
- if (blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9))
- /* this was a loop device, delete it */
- del_loop(blockDevice);
-#endif
-#if defined BB_FEATURE_REMOUNT
- if ( status != 0 && doRemount == TRUE && errno == EBUSY ) {
- status = mount(blockDevice, name, NULL,
- MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL);
- if (status == 0) {
- fprintf(stderr, "umount: %s busy - remounted read-only\n",
- blockDevice);
- /* TODO: update mtab if BB_MTAB is defined */
- } else {
- fprintf(stderr, "umount: Cannot remount %s read-only\n",
- blockDevice);
+ if ((fp = setmntent(mtab_file, "r")) == NULL) {
+ error_msg("Cannot open %s", mtab_file);
+ return;