diff options
author | mckusick <mckusick@FreeBSD.org> | 2001-03-07 06:52:12 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2001-03-07 06:52:12 +0000 |
commit | 48c0c7d0fdb3955d984e7d3880153b7b5c711565 (patch) | |
tree | f2766a3095c2617a718477420a037a31e8d92032 | |
parent | 881dc43b52a9593fa1b02ad9e20cd0e06c4ebd2f (diff) | |
download | FreeBSD-src-48c0c7d0fdb3955d984e7d3880153b7b5c711565.zip FreeBSD-src-48c0c7d0fdb3955d984e7d3880153b7b5c711565.tar.gz |
Bitch more loudly when someone botches changes to kinfo_proc
in the hopes that they will actually *read* the comment above
it and *follow* the instructions so as to cause all the rest
of us less a lot less grief.
-rw-r--r-- | sys/kern/kern_proc.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index cabaf68..46c3739 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -84,6 +84,7 @@ vm_zone_t ithread_zone; void procinit() { + int i, j; lockinit(&allproc_lock, PZERO, "allproc", 0, 0); lockinit(&proctree_lock, PZERO, "proctree", 0, 0); @@ -97,9 +98,17 @@ procinit() * This should really be a compile time warning, but I do * not know of any way to do that... */ - if (sizeof(struct kinfo_proc) != KINFO_PROC_SIZE) - printf("WARNING: size of kinfo_proc (%ld) should be %d!!!\n", - (long)sizeof(struct kinfo_proc), KINFO_PROC_SIZE); + if (sizeof(struct kinfo_proc) != KINFO_PROC_SIZE) { + printf("This message will repeat for the next 20 seconds\n"); + for (i = 0; i < 20; i++) { + printf("WARNING: size of kinfo_proc (%ld) should be %d!!!\n", + (long)sizeof(struct kinfo_proc), KINFO_PROC_SIZE); + printf("The kinfo_proc structure was changed "); + printf("incorrectly in <sys/user.h>\n"); + for (j = 0; j < 0x7ffffff; j++); + } + + } } /* |