aboutsummaryrefslogtreecommitdiffstats
path: root/lib/argv_split.c
Commit message (Collapse)AuthorAgeFilesLines
* LIB: Replace inappropriate include of <linux/bug.h>Robert P. J. Day2007-10-201-1/+2
| | | | | | | | | | | | | Replace an irrelevant include of bug.h with the more appropriate includes of slab.h and module.h. it's not as if the original inclusion is an error, it's simply not related to the contents of that source file, while the other two are. compile-tested on i386. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
* argv_split: allow argv_split to handle NULL pointer in argcp parameter ↵Neil Horman2007-10-171-1/+3
| | | | | | | | | | | | | | | | gracefully It would be nice if the argv_split library function could gracefully handle a NULL pointer in the argcp parameter, so as to allow functions using it that did not care about the value of argc to not have to declare a useless variable. This patch accomplishes that. Tested by me, with successful results. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Satyam Sharma <satyam@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* add argv_split()Jeremy Fitzhardinge2007-07-181-0/+105
argv_split() is a helper function which takes a string, splits it at whitespace, and returns a NULL-terminated argv vector. This is deliberately simple - it does no quote processing of any kind. [ Seems to me that this is something which is already being done in the kernel, but I couldn't find any other implementations, either to steal or replace. Keep an eye out. ] Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Randy Dunlap <randy.dunlap@oracle.com>