From owner-freebsd-hackers Wed Oct 7 02:32:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA19942 for freebsd-hackers-outgoing; Wed, 7 Oct 1998 02:32:49 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from korin.warman.org.pl (korin.nask.waw.pl [148.81.160.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA19936 for ; Wed, 7 Oct 1998 02:32:45 -0700 (PDT) (envelope-from abial@nask.pl) Received: from localhost (abial@localhost) by korin.warman.org.pl (8.9.1/8.8.5) with SMTP id LAA29048; Wed, 7 Oct 1998 11:36:12 +0200 (CEST) X-Authentication-Warning: korin.warman.org.pl: abial owned process doing -bs Date: Wed, 7 Oct 1998 11:36:12 +0200 (CEST) From: Andrzej Bialecki X-Sender: abial@korin.warman.org.pl To: Luigi Rizzo cc: Mike Smith , hackers@FreeBSD.ORG Subject: Re: sysctl for string arguments ? In-Reply-To: <199810070700.IAA08022@labinfo.iet.unipi.it> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 7 Oct 1998, Luigi Rizzo wrote: > > > other strings in sysctl args seem not to be R/W (or at least, > > > not settable with the "sysctl" command... e.g. kern.hostname and the > > > like). > > > > kern.corefile in kern_sig.c. > > ok, thanks (i was looking on -stable...) > > On this subject, it seems that sysctl on 2.2.6 at least does not accept > strings containing spaces: > > sysctl -w kern.hostname=a,b,c > > works, whereas > > sysctl -w kern.hostname="a b c" > > fails. I am not sure who does the parsing of strings removing The quotes are removed by shell. The rest of the argument is parsed by parse(), which first finds the '=', then skips leading spaces, and then takes the rest of the line as a new value. > whitespace, nor if this works on -current Works just fine on -current. Andrzej Bialecki -------------------- ++-------++ ------------------------------------- ||PicoBSD|| FreeBSD in your pocket? Go and see: Research & Academic |+-------+| "Small & Embedded FreeBSD" Network in Poland | |TT~~~| | http://www.freebsd.org/~picobsd/ -------------------- ~-+==---+-+ ------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message