From owner-freebsd-commit Mon Aug 19 10:16:27 1996 Return-Path: owner-commit Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA13723 for freebsd-commit-outgoing; Mon, 19 Aug 1996 10:16:27 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA13718 for ; Mon, 19 Aug 1996 10:16:24 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id RAA16186 for commit@freebsd.org; Mon, 19 Aug 1996 17:17:38 +0200 From: Luigi Rizzo Message-Id: <199608191517.RAA16186@labinfo.iet.unipi.it> Subject: one-line change in sysctl To: commit@FreeBSD.ORG Date: Mon, 19 Aug 1996 17:17:38 +0200 (MET DST) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-commit@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following one-line change to sysctl allows one to use hexadecimal constants in setting integer variables. Would someone care to apply it ? This is for -current as of today (19aug96) but the same applies to 2.1.X No changes to the manpage are necessary, I think. Luigi # diff -bwu sysctl.c.orig sysctl.c --- sysctl.c.orig Mon Aug 19 16:54:49 1996 +++ sysctl.c Mon Aug 19 16:55:19 1996 @@ -166,7 +166,7 @@ switch (kind & CTLTYPE) { case CTLTYPE_INT: - intval = atoi(newval); + sscanf(newval, "%i", &intval); newval = &intval; newsize = sizeof intval; break;