svn commit: r288981 - head/sbin/sysctl

Baptiste Daroussin bapt at FreeBSD.org
Wed Oct 7 09:08:18 UTC 2015


On Wed, Oct 07, 2015 at 01:58:29AM -0700, NGie Cooper wrote:
> 
> > On Oct 7, 2015, at 01:56, Baptiste Daroussin <bapt at FreeBSD.org> wrote:
> > 
> > Author: bapt
> > Date: Wed Oct  7 08:56:01 2015
> > New Revision: 288981
> > URL: https://svnweb.freebsd.org/changeset/base/288981
> > 
> > Log:
> >  Trim spaces at the end of the buffer before trying to convert it to an oid
> > 
> >  This allows to write entries in sysctl.conf with spaces before the '=' like
> >  kern.ipc.shmmax = 9663676416
> > 
> >  MFC after:	1 week
> >  Sponsored by:	Gandi.net
> 
> Won’t this cause issues if the intent of the original value is to have a space before the rest of the value, e.g.
> 
> sysctl my.oid=“ i really wanted a leading space”

Note that here I am only trimming spaces _before_ the = and I'm not touching the
parsing after the '=' for the exact reason you are raising.

Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20151007/9e7bd85a/attachment.bin>


More information about the svn-src-head mailing list