cvs commit: src/usr.sbin/sysinstall config.c

Giorgos Keramidas keramida at freebsd.org
Wed Nov 3 04:40:39 PST 2004


On 2004-11-01 18:07, Stefan Farfeleder <stefanf at 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? :-)



More information about the cvs-src mailing list