Subject: minor tweak to init_main.c
To: None <tech-kern@netbsd.org>
From: Gordon W. Ross <gwr@netbsd.org>
List: tech-kern
Date: 04/09/1999 00:34:43
Really minor nit...
I noticed while debugging early startup stuff that
process one (init) has the wrong p_comm for quite a
long time. Also I'd use strncpy to set them.
Does this look OK?
Index: init_main.c
===================================================================
RCS file: /cvsroot/src/sys/kern/init_main.c,v
retrieving revision 1.145
diff -c -r1.145 init_main.c
*** init_main.c 1999/04/01 00:22:45 1.145
--- init_main.c 1999/04/09 04:30:51
***************
*** 246,252 ****
p->p_stat = SRUN;
p->p_nice = NZERO;
p->p_emul = &emul_netbsd;
! memcpy(p->p_comm, "swapper", sizeof("swapper"));
/* Create credentials. */
cred0.p_refcnt = 1;
--- 246,252 ----
p->p_stat = SRUN;
p->p_nice = NZERO;
p->p_emul = &emul_netbsd;
! strncpy(p->p_comm, "swapper", MAXCOMLEN);
/* Create credentials. */
cred0.p_refcnt = 1;
***************
*** 471,476 ****
--- 471,477 ----
/*
* Now in process 1.
*/
+ strncpy(p->p_comm, "init", MAXCOMLEN);
/*
* This is not the right way to do this. We really should