From: Jorrit Herder Date: Thu, 21 Jul 2005 18:31:27 +0000 (+0000) Subject: Removed printing functionality from IS server. X-Git-Tag: v3.1.0~577 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/index.css?a=commitdiff_plain;h=808202ee3008797398662820129bf7d2526e09d9;p=minix.git Removed printing functionality from IS server. This functionality is now provided by the LOG driver. --- diff --git a/servers/inet/inet.c b/servers/inet/inet.c index f8e7fa80f..1bbbb27a9 100644 --- a/servers/inet/inet.c +++ b/servers/inet/inet.c @@ -149,11 +149,13 @@ PUBLIC void main() } init_rand256(randbits); +#if DEAD_CODE /* Sign on as a server at all offices in the proper order. */ if (svrctl(MMSIGNON, (void *) NULL) == -1) { printf("inet: server signon failed\n"); exit(1); } +#endif #ifdef __minix_vmd if (svrctl(SYSSIGNON, (void *) &info) == -1) pause(); diff --git a/servers/is/Makefile b/servers/is/Makefile index ce485bfa5..4dac26067 100644 --- a/servers/is/Makefile +++ b/servers/is/Makefile @@ -17,7 +17,7 @@ CFLAGS = -I$i LDFLAGS = -i LIBS = -lsys -lsysutil -OBJ = main.o dmp.o dmp_kernel.o dmp_pm.o dmp_fs.o diag.o kputc.o +OBJ = is.o dmp.o dmp_kernel.o dmp_pm.o dmp_fs.o # build local binary all build: $(SERVER) diff --git a/servers/is/dmp.c b/servers/is/dmp.c index f3164c923..5e84f5818 100644 --- a/servers/is/dmp.c +++ b/servers/is/dmp.c @@ -58,7 +58,6 @@ PUBLIC int do_fkey_pressed(message *m) if (pressed(SF3)) fproc_dmp(); if (pressed(SF4)) dtab_dmp(); - if (pressed(SF6)) diagnostics_dmp(); /* Inhibit sending a reply message. */ return(EDONTREPLY); diff --git a/servers/is/dmp_kernel.c b/servers/is/dmp_kernel.c index ad41ed605..bd7ead419 100644 --- a/servers/is/dmp_kernel.c +++ b/servers/is/dmp_kernel.c @@ -197,7 +197,7 @@ PUBLIC void image_dmp() for (j=-NR_TASKS; jproc_name, ip->proc_nr, ip->flags, ip->priority, (long)ip->initial_pc, ip->stksize, maskstr); } @@ -334,12 +334,10 @@ PUBLIC void privileges_dmp() for (sp = &priv[0]; sp < &priv[NR_SYS_PROCS]; sp++) if (sp->s_proc_nr == rp->p_nr) { r ++; break; } if (r == -1 && ! (rp->p_rts_flags & SLOT_FREE)) { - printf("... no privileges found, probaly a user process\n"); - continue; + sp = &priv[USER_PRIV_ID]; } - printf("(%02u) %-7.7s %3x %02.2u", - sp->s_id, - rp->p_name, + printf("(%02u) %-7.7s 0x%02x %02.2u", + sp->s_id, rp->p_name, sp->s_flags, sp->s_call_mask ); printf("\n"); diff --git a/servers/is/main.c b/servers/is/is.c similarity index 84% rename from servers/is/main.c rename to servers/is/is.c index 083fc52d5..052564522 100644 --- a/servers/is/main.c +++ b/servers/is/is.c @@ -21,16 +21,10 @@ int callnr; /* system call number */ extern int errno; /* error number set by system library */ -/* Diagnostic messages buffer. */ -char diag_buf[DIAG_BUF_SIZE]; -int diag_size = 0; -int diag_next = 0; - /* Declare some local functions. */ FORWARD _PROTOTYPE(void init_server, (void) ); FORWARD _PROTOTYPE(void get_work, (void) ); FORWARD _PROTOTYPE(void reply, (int whom, int result) ); -FORWARD _PROTOTYPE(void signal_handler, (int sig) ); /*===========================================================================* * main * @@ -56,9 +50,6 @@ PUBLIC void main(void) switch (callnr) { case SYS_EVENT: sigset = (sigset_t) m_in.NOTIFY_ARG; - if (sigismember(&sigset, SIGKMESS)) { - result = do_new_kmess(&m_in); - } if (sigismember(&sigset, SIGTERM)) { /* nothing to do on shutdown */ } @@ -66,9 +57,6 @@ PUBLIC void main(void) /* nothing to do on shutdown */ } continue; - case DIAGNOSTICS: - result = do_diagnostics(&m_in); - break; case FKEY_PRESSED: result = do_fkey_pressed(&m_in); break; @@ -87,20 +75,6 @@ PUBLIC void main(void) } -/*===========================================================================* - * signal_handler * - *===========================================================================*/ -PRIVATE void signal_handler(sig) -int sig; /* signal number */ -{ -/* Expect a SIGTERM signal when this server must shutdown. */ - if (sig == SIGTERM) { - printf("Shutting down IS server due to SIGTERM.\n"); - exit(0); - } else { - printf("IS got signal %d\n", sig); - } -} /*===========================================================================* diff --git a/servers/is/proto.h b/servers/is/proto.h index 333f8db96..efcba7f94 100644 --- a/servers/is/proto.h +++ b/servers/is/proto.h @@ -3,15 +3,6 @@ /* main.c */ _PROTOTYPE( void main, (void) ); -/* putk.c */ -_PROTOTYPE( void kputc, (int c) ); - -/* diag.c */ -_PROTOTYPE( int do_new_kmess, (message *m) ); -_PROTOTYPE( int do_diagnostics, (message *m) ); -_PROTOTYPE( void diag_putc, (int c) ); -_PROTOTYPE( void diagnostics_dmp, (void) ); - /* dmp.c */ _PROTOTYPE( int do_fkey_pressed, (message *m) );