summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen1999-11-27 20:34:28 +0000
committerEric Andersen1999-11-27 20:34:28 +0000
commit1667fb4b633e8a250a17aea782baa18fc872d9d7 (patch)
treede5d7c942b780d43e67e2a97fca128597f80b7b8
parentc054b21f7d0420b1f8f8100a17fb14de9c947ef2 (diff)
downloadbusybox-1667fb4b633e8a250a17aea782baa18fc872d9d7.zip
busybox-1667fb4b633e8a250a17aea782baa18fc872d9d7.tar.gz
Fixes
-rw-r--r--Makefile12
-rw-r--r--umount.c9
-rw-r--r--util-linux/umount.c9
3 files changed, 19 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index a754c20..085ad81 100644
--- a/Makefile
+++ b/Makefile
@@ -80,6 +80,9 @@ LIBRARIES=
OBJECTS=$(shell ./busybox.sh)
CFLAGS+= -DBB_VER='"$(VERSION)"'
CFLAGS+= -DBB_BT='"$(BUILDTIME)"'
+ifdef BB_INIT_RC_EXIT_CMD
+ CFLAGS += -DBB_INIT_CMD_IF_RC_SCRIPT_EXITS=${BB_INIT_RC_EXIT_CMD}
+endif
all: busybox busybox.links
@@ -89,7 +92,7 @@ busybox: $(OBJECTS)
busybox.links:
- ./busybox.mkll | sort >$@
-
+
clean:
- rm -f $(PROG) busybox.links *~ *.o core
- rm -rf busybox_install
@@ -97,19 +100,14 @@ clean:
distclean: clean
- rm -f $(PROG)
-force:
-
$(OBJECTS): busybox.def.h internal.h Makefile
install: busybox busybox.links
./install.sh $(PREFIX)
-whichversion:
- @echo $(VERSION)
-
-
dist: release
release: distclean
(cd .. ; rm -rf busybox-$(VERSION) ; cp -a busybox busybox-$(VERSION); rm -rf busybox-$(VERSION)/CVS busybox-$(VERSION)/.cvsignore ; tar -cvzf busybox-$(VERSION).tar.gz busybox-$(VERSION))
+
diff --git a/umount.c b/umount.c
index 061bb9b..3bd8681 100644
--- a/umount.c
+++ b/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)
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 061bb9b..3bd8681 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)