From 1667fb4b633e8a250a17aea782baa18fc872d9d7 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 27 Nov 1999 20:34:28 +0000 Subject: Fixes --- util-linux/umount.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'util-linux') diff --git a/util-linux/umount.c b/util-linux/umount.c index 061bb9b16..3bd86814e 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c @@ -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) -- cgit v1.2.3