[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] modprobe: handle module arguments containing spaces
From:       Peter Korsgaard <peter () korsgaard ! com>
Date:       2015-09-09 13:06:05
Message-ID: 87twr3hhdu.fsf () dell ! be ! 48ers ! dk
[Download RAW message or body]

>>>>> "Denys" == Denys Vlasenko <vda.linux@googlemail.com> writes:

Hi,

>> +/* like strsep(&stringp, "\n\t ") but handles quotes (") */
 >> +static char *split_quotes(char **stringp)
 >> +{
 >> +       char *s, *start = *stringp;
 >> +
 >> +       if (!start)
 >> +               return NULL;
 >> +
 >> +       for (s = start; ; s++) {
 >> +               switch (*s) {
 >> +               case '"':
 >> +                       s = strchr(s + 1, '"'); /* find trailing quote */
 >> +                       if (*s != '\0')
 >> +                               s++; /* skip trailing quote */

 > bug, you must be thinking about using strchrnul().

Argh, indeed - Sorry about that.

 > Applied with small changes, thanks

Thanks!

-- 
Peter Korsgaard 
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic