From owner-freebsd-doc@FreeBSD.ORG Sat Feb 21 16:50:34 2004 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60B8416A4D6 for ; Sat, 21 Feb 2004 16:50:34 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 444A643D1F for ; Sat, 21 Feb 2004 16:50:34 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i1M0oYbv095061 for ; Sat, 21 Feb 2004 16:50:34 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i1M0oYYk095060; Sat, 21 Feb 2004 16:50:34 -0800 (PST) (envelope-from gnats) Resent-Date: Sat, 21 Feb 2004 16:50:34 -0800 (PST) Resent-Message-Id: <200402220050.i1M0oYYk095060@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bruce Cran Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E996B16A4CE for ; Sat, 21 Feb 2004 16:41:25 -0800 (PST) Received: from mta5-svc.business.ntl.com (mta5-svc.business.ntl.com [62.253.164.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7863D43D1D for ; Sat, 21 Feb 2004 16:41:25 -0800 (PST) (envelope-from bruce@cran.org.uk) Received: from box1.cran ([82.2.140.60]) by mta5-svc.business.ntl.com (InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP id <20040222004124.ERPA16572.mta5-svc.business.ntl.com@box1.cran> for ; Sun, 22 Feb 2004 00:41:24 +0000 Received: from box1.cran (localhost.cran [127.0.0.1]) by box1.cran (8.12.11/8.12.10) with ESMTP id i1M0f9Cu001057 for ; Sun, 22 Feb 2004 00:41:09 GMT (envelope-from brucec@box1.cran) Received: (from brucec@localhost) by box1.cran (8.12.11/8.12.10/Submit) id i1M0f9oT001056; Sun, 22 Feb 2004 00:41:09 GMT (envelope-from brucec) Message-Id: <200402220041.i1M0f9oT001056@box1.cran> Date: Sun, 22 Feb 2004 00:41:09 GMT From: Bruce Cran To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/63198: sysctl_ctx_init.9 example code: 'name' parameters not quoted X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bruce Cran List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2004 00:50:34 -0000 >Number: 63198 >Category: docs >Synopsis: sysctl_ctx_init.9 example code: 'name' parameters not quoted >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sat Feb 21 16:50:33 PST 2004 >Closed-Date: >Last-Modified: >Originator: Bruce Cran >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD box1.cran 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Fri Feb 20 21:31:18 GMT 2004 brucec@box1.cran:/usr/obj/usr/src/sys/MYKERNEL i386 FreeBSD 5.2-CURRENT >Description: The sysctl_ctx_init man page has an example which won't compile, because the newtree, newint and newstring parameters should be strings, but are used without quotation marks. >How-To-Repeat: 'man sysctl_ctx_init' >Fix: --- /usr/src/share/man/man9/sysctl_ctx_init.9 Wed Jan 9 11:43:48 2002 +++ sysctl_ctx_init.9 Sun Feb 22 00:35:20 2004 @@ -192,14 +192,14 @@ sysctl_ctx_init(&clist); oidp = SYSCTL_ADD_NODE( &clist, SYSCTL_STATIC_CHILDREN(/* tree top */), - OID_AUTO, newtree, CTFLAG_RW, 0, "new top level tree"); + OID_AUTO, "newtree", CTFLAG_RW, 0, "new top level tree"); oidp = SYSCTL_ADD_INT( &clist, SYSCTL_CHILDREN(oidp), - OID_AUTO, newint, CTLFLAG_RW, &a_int, 0, "new int leaf"); + OID_AUTO, "newint", CTLFLAG_RW, &a_int, 0, "new int leaf"); ... oidp = SYSCTL_ADD_NODE( &clist, SYSCTL_STATIC_CHILDREN(_debug), - OID_AUTO, newtree, CTFLAG_RW, 0, "new tree under debug"); + OID_AUTO, "newtree", CTFLAG_RW, 0, "new tree under debug"); oidp = SYSCTL_ADD_STRING( &clist, SYSCTL_CHILDREN(oidp), - OID_AUTO, newstring, CTLFLAG_R, string, 0, "new string leaf"); + OID_AUTO, "newstring", CTLFLAG_R, string, 0, "new string leaf"); ... /* Now we can free up the oids */ if(sysctl_ctx_free(&clist)) { >Release-Note: >Audit-Trail: >Unformatted: