diff options
Diffstat (limited to 'umount.c')
-rw-r--r-- | umount.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -73,8 +73,13 @@ umount_all(int useMtab) while ((m = getmntent (mountTable)) != 0) { char *blockDevice = m->mnt_fsname; #if ! defined BB_MTAB - if (strcmp (blockDevice, "/dev/root") == 0) - blockDevice = (getfsfile ("/"))->fs_spec; + if (strcmp (blockDevice, "/dev/root") == 0) { + struct fstab* fstabItem; + fstabItem = getfsfile ("/"); + if (fstabItem != NULL) { + blockDevice = fstabItem->fs_spec; + } + } #endif /* Don't umount /proc when doing umount -a */ if (strcmp (blockDevice, "proc") == 0) |