summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-09-07 05:23:28 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-09-07 05:23:28 +0000
commite9f98a85f270f7e3c50956a48fecadf90fa4b53a (patch)
tree471fb0c677029f6ce8ddcfef011bc78b509e8e53
parent539465f06ab53d2e04ae387c929963c2b7b938c9 (diff)
downloadFreeBSD-src-e9f98a85f270f7e3c50956a48fecadf90fa4b53a.zip
FreeBSD-src-e9f98a85f270f7e3c50956a48fecadf90fa4b53a.tar.gz
Turning on warning for static LDT allocation.
-rw-r--r--sys/i386/i386/sys_machdep.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index f809b88..e29b459 100644
--- a/sys/i386/i386/sys_machdep.c
+++ b/sys/i386/i386/sys_machdep.c
@@ -409,10 +409,8 @@ i386_get_ldt(td, args)
return(error);
}
-#ifdef DEBUG
static int ldt_warnings;
#define NUM_LDT_WARNINGS 10
-#endif
static int
i386_set_ldt(td, args)
@@ -464,14 +462,12 @@ i386_set_ldt(td, args)
}
if (!(uap->start == LDT_AUTO_ALLOC && uap->num == 1)) {
-#ifdef DEBUG
/* complain a for a while if using old methods */
if (ldt_warnings++ < NUM_LDT_WARNINGS) {
printf("Warning: pid %d used static ldt allocation.\n",
td->td_proc->p_pid);
printf("See the i386_set_ldt man page for more info\n");
}
-#endif
/* verify range of descriptors to modify */
largest_ld = uap->start + uap->num;
if (uap->start >= MAX_LD ||
OpenPOWER on IntegriCloud