Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Oct 1998 11:36:12 +0200 (CEST)
From:      Andrzej Bialecki <abial@nask.pl>
To:        Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Cc:        Mike Smith <mike@smith.net.au>, hackers@FreeBSD.ORG
Subject:   Re: sysctl for string arguments ?
Message-ID:  <Pine.BSF.4.02A.9810071128280.14555-100000@korin.warman.org.pl>
In-Reply-To: <199810070700.IAA08022@labinfo.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
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

--------------------   ++-------++  -------------------------------------
 <abial@nask.pl>       ||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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02A.9810071128280.14555-100000>