From 8c024e28a194ff17dc6fa03b459dc416e6d24896 Mon Sep 17 00:00:00 2001 From: Jorrit Herder Date: Tue, 19 Jul 2005 12:12:48 +0000 Subject: [PATCH] Changed Makefiles: drivers are now installed in /usr/sbin. TTY now gets SYS_EVENT message with sigset (e.g., SIGKMESS, SIGKSTOP). --- drivers/at_wini/Makefile | 4 ++-- drivers/dpeth/Makefile | 8 ++++++-- drivers/floppy/Makefile | 4 ++-- drivers/fxp/Makefile | 4 ++-- drivers/log/Makefile | 4 ++-- drivers/memory/Makefile | 4 ++-- drivers/printer/Makefile | 4 ++-- drivers/rtl8139/Makefile | 4 ++-- drivers/tty/Makefile | 4 ++-- drivers/tty/keyboard.c | 2 +- drivers/tty/tty.c | 13 +++++++++++-- 11 files changed, 34 insertions(+), 21 deletions(-) diff --git a/drivers/at_wini/Makefile b/drivers/at_wini/Makefile index 173b40dc4..d1390d978 100644 --- a/drivers/at_wini/Makefile +++ b/drivers/at_wini/Makefile @@ -30,8 +30,8 @@ $(LIBDRIVER): cd $d/libdriver && $(MAKE) # install with other drivers -install: /usr/sbin/drivers/$(DRIVER) -/usr/sbin/drivers/$(DRIVER): $(DRIVER) +install: /usr/sbin/$(DRIVER) +/usr/sbin/$(DRIVER): $(DRIVER) install -o root -cs $? $@ # clean up local files diff --git a/drivers/dpeth/Makefile b/drivers/dpeth/Makefile index d404db5f3..09053aa2a 100644 --- a/drivers/dpeth/Makefile +++ b/drivers/dpeth/Makefile @@ -2,6 +2,10 @@ ## Makefile for ISA ethernet drivers May 02, 2000 ## ## $Log$ +## Revision 1.2 2005/07/19 12:12:47 jnherder +## Changed Makefiles: drivers are now installed in /usr/sbin. +## TTY now gets SYS_EVENT message with sigset (e.g., SIGKMESS, SIGKSTOP). +## ## Revision 1.1 2005/06/29 10:16:46 beng ## Import of dpeth 3c501/3c509b/.. ethernet driver by ## Giovanni Falzoni . @@ -34,8 +38,8 @@ $(DRIVER): $(OBJS) install -S 4kw $(DRIVER) ## Install with other drivers -install: /usr/sbin/drivers/$(DRIVER) -/usr/sbin/drivers/$(DRIVER): $(DRIVER) +install: /usr/sbin/$(DRIVER) +/usr/sbin/$(DRIVER): $(DRIVER) install -o root -cs $? $@ ## Generate dependencies diff --git a/drivers/floppy/Makefile b/drivers/floppy/Makefile index 9c11fe85a..5110219db 100644 --- a/drivers/floppy/Makefile +++ b/drivers/floppy/Makefile @@ -29,8 +29,8 @@ $(LIBDRIVER): cd $d/libdriver && $(MAKE) # install with other drivers -install: /usr/sbin/drivers/$(DRIVER) -/usr/sbin/drivers/$(DRIVER): $(DRIVER) +install: /usr/sbin/$(DRIVER) +/usr/sbin/$(DRIVER): $(DRIVER) install -o root -cs $? $@ # clean up local files diff --git a/drivers/fxp/Makefile b/drivers/fxp/Makefile index afafd0508..d53aa934b 100644 --- a/drivers/fxp/Makefile +++ b/drivers/fxp/Makefile @@ -28,8 +28,8 @@ $(LIBPCI): cd $d/libpci && $(MAKE) # install with other drivers -install: /usr/sbin/drivers/$(DRIVER) -/usr/sbin/drivers/$(DRIVER): $(DRIVER) +install: /usr/sbin/$(DRIVER) +/usr/sbin/$(DRIVER): $(DRIVER) install -o root -cs $? $@ # clean up local files diff --git a/drivers/log/Makefile b/drivers/log/Makefile index 80416e588..0f4855784 100644 --- a/drivers/log/Makefile +++ b/drivers/log/Makefile @@ -29,8 +29,8 @@ $(LIBDRIVER): cd $d/libdriver && $(MAKE) # install with other drivers -install: /usr/sbin/drivers/$(DRIVER) -/usr/sbin/drivers/$(DRIVER): $(DRIVER) +install: /usr/sbin/$(DRIVER) +/usr/sbin/$(DRIVER): $(DRIVER) install -o root -cs $? $@ # clean up local files diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile index 4501752d8..b696edba7 100644 --- a/drivers/memory/Makefile +++ b/drivers/memory/Makefile @@ -36,8 +36,8 @@ aes/rijndael_alg.o: $(CC) -c -o $@ aes/rijndael_alg.c # install with other drivers -install: /usr/sbin/drivers/$(DRIVER) -/usr/sbin/drivers/$(DRIVER): $(DRIVER) +install: /usr/sbin/$(DRIVER) +/usr/sbin/$(DRIVER): $(DRIVER) install -o root -cs $? $@ # clean up local files diff --git a/drivers/printer/Makefile b/drivers/printer/Makefile index c9b4b536e..09f475770 100644 --- a/drivers/printer/Makefile +++ b/drivers/printer/Makefile @@ -24,8 +24,8 @@ $(DRIVER): $(OBJ) # install -S 64w $(DRIVER) # install with other drivers -install: /usr/sbin/drivers/$(DRIVER) -/usr/sbin/drivers/$(DRIVER): $(DRIVER) +install: /usr/sbin/$(DRIVER) +/usr/sbin/$(DRIVER): $(DRIVER) install -o root -c $? $@ # install -o root -cs $? $@ diff --git a/drivers/rtl8139/Makefile b/drivers/rtl8139/Makefile index adcba51bc..24b6c4ec0 100644 --- a/drivers/rtl8139/Makefile +++ b/drivers/rtl8139/Makefile @@ -30,8 +30,8 @@ $(PCI): cd $d/libpci && $(MAKE) # install with other drivers -install: /usr/sbin/drivers/$(DRIVER) -/usr/sbin/drivers/$(DRIVER): $(DRIVER) +install: /usr/sbin/$(DRIVER) +/usr/sbin/$(DRIVER): $(DRIVER) install -o root -cs $? $@ # clean up local files diff --git a/drivers/tty/Makefile b/drivers/tty/Makefile index dac291cec..0229b2191 100644 --- a/drivers/tty/Makefile +++ b/drivers/tty/Makefile @@ -26,9 +26,9 @@ $(DRIVER): $(OBJ) install -S 256w $(DRIVER) # install with other drivers -install: /usr/sbin/drivers/$(DRIVER) +install: /usr/sbin/$(DRIVER) cd keymaps && $(MAKE) -$(MAKEFLAGS) $@ -/usr/sbin/drivers/$(DRIVER): $(DRIVER) +/usr/sbin/$(DRIVER): $(DRIVER) install -o root -cs $? $@ # clean up local files diff --git a/drivers/tty/keyboard.c b/drivers/tty/keyboard.c index 138a1aa88..6d65507e5 100644 --- a/drivers/tty/keyboard.c +++ b/drivers/tty/keyboard.c @@ -629,7 +629,7 @@ message *m; /* request message to TTY */ */ while (nb_receive(ANY, m) == OK) { switch(m->m_type) { - case NEW_KMESS: do_new_kmess(m); break; + case SYS_EVENT: do_new_kmess(m); break; case DIAGNOSTICS: do_diagnostics(m); break; default: ; /* do nothing */ } diff --git a/drivers/tty/tty.c b/drivers/tty/tty.c index b935bf536..cd67d2de3 100644 --- a/drivers/tty/tty.c +++ b/drivers/tty/tty.c @@ -204,9 +204,18 @@ PUBLIC void main(void) expire_timers(); /* run watchdogs of expired timers */ continue; /* contine to check for events */ } - case NEW_KMESS: /* new kernel message is available */ - do_new_kmess(&tty_mess); + case SYS_EVENT: { /* new kernel message is available */ + sigset_t sigset = (sigset_t) tty_mess.NOTIFY_ARG; + if (sigismember(&sigset, SIGKMESS)) { + do_new_kmess(&tty_mess); + } else if (sigismember(&sigset, SIGTERM)) { + cons_stop(); /* first switch to primary console */ + } else if (sigismember(&sigset, SIGKSTOP)) { + cons_stop(); /* switch to primary console */ + do_panic_dumps(&tty_mess); + } continue; + } case HARD_STOP: { /* MINIX is going down */ static int stop = 0; /* expect two HARD_STOP messages */ if (! stop++) {