From owner-freebsd-bugs@FreeBSD.ORG Wed Jan 2 20:00:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D9C9FE88 for ; Wed, 2 Jan 2013 20:00:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id BD4C5E7 for ; Wed, 2 Jan 2013 20:00:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id r02K00ff067910 for ; Wed, 2 Jan 2013 20:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id r02K000o067906; Wed, 2 Jan 2013 20:00:00 GMT (envelope-from gnats) Resent-Date: Wed, 2 Jan 2013 20:00:00 GMT Resent-Message-Id: <201301022000.r02K000o067906@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Fabian Keil Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8F74AE33 for ; Wed, 2 Jan 2013 19:51:49 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 6210BBF for ; Wed, 2 Jan 2013 19:51:49 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r02JpmTx099076 for ; Wed, 2 Jan 2013 19:51:48 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r02Jpm2s099069; Wed, 2 Jan 2013 19:51:48 GMT (envelope-from nobody) Message-Id: <201301021951.r02Jpm2s099069@red.freebsd.org> Date: Wed, 2 Jan 2013 19:51:48 GMT From: Fabian Keil To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/174910: [patch][regression] sysctl error message includes memory address instead of string X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2013 20:00:00 -0000 >Number: 174910 >Category: misc >Synopsis: [patch][regression] sysctl error message includes memory address instead of string >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jan 02 20:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Fabian Keil >Release: HEAD >Organization: >Environment: FreeBSD r500.local 10.0-CURRENT FreeBSD 10.0-CURRENT #537 r+6795152: Tue Jan 1 01:38:41 CET 2013 fk@r500.local:/usr/obj/usr/src/sys/ZOEY amd64 >Description: Since r244198 the sysctl error message shown when trying to modify read only tunables ends with a memory address instead of the string potentially containing the line number. >How-To-Repeat: fk@r500 ~ $sysctl vfs.zfs.zio.exclude_metadata=0 sysctl: oid 'vfs.zfs.zio.exclude_metadata' is a read only tunable0x7fffffffc800 >Fix: Apply attached patch. Patch attached with submission follows: >From d0996d442d063089705dec2fe7e48848b07dd531 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 2 Jan 2013 20:18:37 +0100 Subject: [PATCH] Fix sysctl complaint when trying to modify a tunable that is read only Since r244198 the address of the line string (empty, or a line number in case of -f) was shown instead of the string itself: fk@r500 ~ $sysctl vfs.zfs.zio.exclude_metadata=0 sysctl: oid 'vfs.zfs.zio.exclude_metadata' is a read only tunable0x7fffffffc820 sysctl: Tunable values are set in /boot/loader.conf --- sbin/sysctl/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 3df4f01..d62e52a 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -266,7 +266,7 @@ parse(const char *string, int lineno) if (!(kind & CTLFLAG_WR)) { if (kind & CTLFLAG_TUN) { - warnx("oid '%s' is a read only tunable%p", bufp, line); + warnx("oid '%s' is a read only tunable%s", bufp, line); warnx("Tunable values are set in /boot/loader.conf"); } else warnx("oid '%s' is read only%s", bufp, line); -- 1.8.0.3 >Release-Note: >Audit-Trail: >Unformatted: