Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Nov 2004 14:40:33 +0200
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Stefan Farfeleder <stefanf@freebsd.org>
Cc:        "David E. O'Brien" <obrien@freebsd.org>
Subject:   Re: cvs commit: src/usr.sbin/sysinstall config.c
Message-ID:  <20041103124033.GA34455@orion.daedalusnetworks.priv>
In-Reply-To: <20041101170748.GA81210@wombat.fafoe.narf.at>
References:  <200411011632.iA1GWA8q030777@repoman.freebsd.org> <20041101170748.GA81210@wombat.fafoe.narf.at>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-11-01 18:07, Stefan Farfeleder <stefanf@freebsd.org> wrote:
> On Mon, Nov 01, 2004 at 04:32:10PM +0000, David E. O'Brien wrote:
> > obrien      2004-11-01 16:32:10 UTC
> >
> >   FreeBSD src repository
> >
> >   Modified files:
> >     usr.sbin/sysinstall  config.c
> >   Log:
> >   fix typo in generated /etc/exports: escape all '
>
> > -	    vsystem("echo '# Note that BSD's export syntax is \"host-centric\" vs. Sun\'s \"FS-centric\" one.' >> /etc/exports");
> > +	    vsystem("echo '# Note that BSD\'s export syntax is \"host-centric\" vs. Sun\'s \"FS-centric\" one.' >> /etc/exports");
>
> You need two backslashes here; \' is equivalent to ' inside string literals.

I've discovered after submitting the change David committed that \' is
not enough to quote single quotes in strings quoted with single quotes
too.  The correct quoting would be something like:

vsystem("echo '# Note that BSD'\''s export syntax is \"host-centric\" vs. Sun'\''s \"FS-centric\" one.' >> /etc/exports");

Any chance for a fix of the fix? :-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041103124033.GA34455>