Rest ...
This commit is contained in:
parent
9333141704
commit
78f20c3959
7 changed files with 18 additions and 13 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -99,7 +99,7 @@ fdboot: image
|
|||
exec su root mkboot $@
|
||||
@sync
|
||||
|
||||
install: services hdboot
|
||||
install: includes services hdboot
|
||||
|
||||
# clean up compile results
|
||||
clean:
|
||||
|
|
Loading…
Reference in a new issue