mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Today split_string_into_pair() will not really do what its name is suggesting: instead of splitting a string into a pair of strings using a delimiter, it will return the first two strings of the initial string by using the delimiter. This is never what the callers want, so modify split_string_into_pair() to split the string only at the first delimiter found, resulting in something like "x=a=b" to be split into "x" and "a=b" when being called with "=" as the delimiter. Today the returned strings would be "x" and "a". At the same time switch the delimiter from "const char *" (allowing multiple delimiter characters) to "char" (a single character only), as this makes the function more simple without breaking any use cases. Suggested-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Jason Andryuk <jandryuk@gmail.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com>