diff --git a/drivers/rescue/rescue.c b/drivers/rescue/rescue.c index 1b4df7776..dfdf3ea4a 100644 --- a/drivers/rescue/rescue.c +++ b/drivers/rescue/rescue.c @@ -10,7 +10,7 @@ #include "../../kernel/config.h" #include "../../kernel/type.h" - +#define VERBOSE 0 /* enable/ disable messages */ #define NR_DEVS 1 /* number of rescue devices */ #define RESCUE_KBYTES 128 /* default size in kilobytes */ @@ -200,8 +200,10 @@ char **argv; panic("RESCUE","Couldn't store rescue disk details at DS.",s); } +#if VERBOSE printf("RESCUE disk %d (size %u/base %u) initialized\n", i, rescue_size, rescue_base); +#endif } } } diff --git a/drivers/rtl8139/rtl8139.c b/drivers/rtl8139/rtl8139.c index 3b5ce9662..7863fb260 100755 --- a/drivers/rtl8139/rtl8139.c +++ b/drivers/rtl8139/rtl8139.c @@ -299,13 +299,13 @@ int main(int argc, char *argv[]) for (rep= &re_table[0]; rep < re_table+RE_PORT_NR; rep++) rl_init_buf(rep); - /* Try to notify inet that we are present (again). */ + /* Try to notify INET that we are present (again). If INET cannot + * be found, assume this is the first time we started and INET is + * not yet alive. + */ (progname=strrchr(argv[0],'/')) ? progname++ : (progname=argv[0]); r = findproc("inet", &inet_proc_nr); - if (r == OK) - notify(inet_proc_nr); - else - printf("rtl8139: cannot find proc number for inet: %d\n", r); + if (r == OK) notify(inet_proc_nr); while (TRUE) diff --git a/include/minix/com.h b/include/minix/com.h index a56517426..e4bf92c88 100755 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -390,7 +390,8 @@ #define RS_UP (RS_RQ_BASE + 0) /* start system service */ #define RS_DOWN (RS_RQ_BASE + 1) /* stop system service */ #define RS_REFRESH (RS_RQ_BASE + 2) /* restart system service */ -#define RS_SHUTDOWN (RS_RQ_BASE + 3) /* alert about shutdown */ +#define RS_RESCUE (RS_RQ_BASE + 3) /* set rescue directory */ +#define RS_SHUTDOWN (RS_RQ_BASE + 4) /* alert about shutdown */ # define RS_CMD_ADDR m1_p1 /* command string */ # define RS_CMD_LEN m1_i1 /* length of command */ diff --git a/kernel/system/do_exit.c b/kernel/system/do_exit.c index f6a28d060..6c144ffc9 100644 --- a/kernel/system/do_exit.c +++ b/kernel/system/do_exit.c @@ -50,7 +50,7 @@ register struct proc *rc; /* slot of process to clean up */ register struct proc **xpp; /* iterate over caller queue */ int i; int sys_id; - char rts_flags; + char saved_rts_flags; /* Don't clear if already cleared. */ if(isemptyp(rc)) return; @@ -66,7 +66,7 @@ register struct proc *rc; /* slot of process to clean up */ * this point. All important fields are reinitialized when the * slots are assigned to another, new process. */ - rts_flags = rc->p_rts_flags; + saved_rts_flags = rc->p_rts_flags; rc->p_rts_flags = SLOT_FREE; if (priv(rc)->s_flags & SYS_PROC) priv(rc)->s_proc_nr = NONE; @@ -74,7 +74,7 @@ register struct proc *rc; /* slot of process to clean up */ * message (e.g., the process was killed by a signal, rather than it doing * a normal exit), then it must be removed from the message queues. */ - if (rts_flags & SENDING) { + if (saved_rts_flags & SENDING) { xpp = &proc[rc->p_sendto].p_caller_q; /* destination's queue */ while (*xpp != NIL_PROC) { /* check entire queue */ if (*xpp == rc) { /* process is on the queue */ diff --git a/servers/rs/manager.c b/servers/rs/manager.c index 341e67748..1ad9ae1b5 100644 --- a/servers/rs/manager.c +++ b/servers/rs/manager.c @@ -345,8 +345,6 @@ struct rproc *rp; */ execve(rp->r_argv[0], rp->r_argv, NULL); /* POSIX execute */ file_only = strrchr(rp->r_argv[0], '/') + 1; - printf("Absolute exec failed (%d), trying file only: %s\n", - errno, file_only); execve(file_only, rp->r_argv, NULL); /* POSIX execute */ printf("RS: exec failed for %s: %d\n", rp->r_argv[0], errno); exit(EXEC_FAILED); /* terminate child */ diff --git a/servers/rs/service.c b/servers/rs/service.c index 3cdac4830..15f965e31 100644 --- a/servers/rs/service.c +++ b/servers/rs/service.c @@ -195,6 +195,10 @@ PRIVATE int parse_arguments(int argc, char **argv) exit(EINVAL); } req_path = argv[ARG_PATH]; + if (req_path[0] != '/') { + print_usage(argv[ARG_NAME], "rescue dir should be absolute path"); + exit(EINVAL); + } if (stat(argv[ARG_PATH], &stat_buf) == -1) { print_usage(argv[ARG_NAME], "couldn't get status of directory"); exit(errno); diff --git a/tools/Makefile b/tools/Makefile index ab652518f..39d6861cc 100755 --- a/tools/Makefile +++ b/tools/Makefile @@ -99,7 +99,7 @@ fdboot: image exec su root mkboot $@ @sync -install: services hdboot +install: includes services hdboot # clean up compile results clean: