Bug 174910 - [patch][regression] sysctl error message includes memory address instead of string
Summary: [patch][regression] sysctl error message includes memory address instead of s...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Xin LI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 20:00 UTC by Fabian Keil
Modified: 2013-01-13 04:30 UTC (History)
0 users

See Also:


Attachments
file.txt (1.11 KB, text/plain)
2013-01-02 20:00 UTC, Fabian Keil
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Keil 2013-01-02 20:00:00 UTC
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.

Fix: Apply attached patch.

Patch attached with submission follows:
How-To-Repeat: fk@r500 ~ $sysctl vfs.zfs.zio.exclude_metadata=0
sysctl: oid 'vfs.zfs.zio.exclude_metadata' is a read only tunable0x7fffffffc800
Comment 1 Xin LI freebsd_committer 2013-01-13 04:21:50 UTC
Responsible Changed
From-To: freebsd-bugs->delphij

My fault.
Comment 2 Xin LI freebsd_committer 2013-01-13 04:28:52 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 3 dfilter service freebsd_committer 2013-01-13 04:28:53 UTC
Author: delphij
Date: Sun Jan 13 04:28:44 2013
New Revision: 245361
URL: http://svnweb.freebsd.org/changeset/base/245361

Log:
  Use the right format string for line buffer.
  
  PR:		bin/174910
  Submitted by:	Fabian Keil <fk fabiankeil.de>

Modified:
  head/sbin/sysctl/sysctl.c

Modified: head/sbin/sysctl/sysctl.c
==============================================================================
--- head/sbin/sysctl/sysctl.c	Sun Jan 13 04:14:46 2013	(r245360)
+++ head/sbin/sysctl/sysctl.c	Sun Jan 13 04:28:44 2013	(r245361)
@@ -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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"