[Libsysio-commit] HEAD: libsysio/src mount.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2003-08-26 13:17:25
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1:/tmp/cvs-serv16025 Modified Files: mount.c Log Message: Fix for mount options processing from Jim Schutt: This patch fixes a buglet in options processing. If the current code parses an option string where the first option is a file-system specific option, it will copy that option and return without processing any more options. This happens since under these conditions, src and dst match at least up to the end of the first option, so *dst = '\0' also terminates the source string, and the loop exits early. Index: mount.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mount.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -b -B -p -r1.5 -r1.6 --- mount.c 18 Apr 2003 20:24:05 -0000 1.5 +++ mount.c 26 Aug 2003 13:17:20 -0000 1.6 @@ -541,11 +541,12 @@ parse_opts(char *opts, unsigned *flagsp) *dst++ = *src++; while (src != cp); } - *dst = '\0'; if (!*src) break; + *dst = '\0'; src++; /* skip comma */ } + *dst = '\0'; *flagsp = flags; return opts; |