tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Increasing FreeBSD compatibility in mtree



On Dec 20, 10:22am, brooks%freebsd.org@localhost (Brooks Davis) wrote:
-- Subject: Re: Increasing FreeBSD compatibility in mtree

| --- spec.c    (revision 244449)
| +++ spec.c    (working copy)
| @@ -415,11 +415,15 @@
|  char *
|  vispath(const char *path)
|  {
| -     const char extra[] = { ' ', '\t', '\n', '\\', '#', '*', '?', '[',
| -         '#', '\0' };
| +     const char extra[] = { ' ', '\t', '\n', '\\', '\0' };
| +     const char extra_glob[] = { ' ', '\t', '\n', '\\', '#', '*', '?',
| +          '[', '\0' };
|       static char pathbuf[4*MAXPATHLEN + 1];
| =20
| -     strsvis(pathbuf, path, VIS_CSTYLE, extra);
| +     if (flavor == F_NETBSD6)
| +             strsvis(pathbuf, path, VIS_CSTYLE, extra);
| +     else
| +             strsvis(pathbuf, path, VIS_OCTAL, extra_glob);
|       return(pathbuf);
|  }

Looks good, and I committed it. I made a couple of changes in the above patch:
1. You missed '#' in the first string
2. I made both strings static.

Let's see what breaks :-)

Best,

christos


Home | Main Index | Thread Index | Old Index