[systemd-devel] [PATCH 1/9] util: Add unescape_first_word()

Richard Maw richard.maw at codethink.co.uk
Thu May 28 09:43:34 PDT 2015


On Thu, May 28, 2015 at 01:02:07PM +0100, Richard Maw wrote:
> diff --git a/src/shared/util.h b/src/shared/util.h
> index eb35952..dd86ddc 100644
> --- a/src/shared/util.h
> +++ b/src/shared/util.h
> @@ -855,10 +855,13 @@ int is_dir(const char *path, bool follow);
>  int is_device_node(const char *path);
>  
>  typedef enum UnquoteFlags {
> -        UNQUOTE_RELAX     = 1,
> -        UNQUOTE_CUNESCAPE = 2,
> +        UNQUOTE_RELAX           = 1,
> +        UNQUOTE_CUNESCAPE       = 2,
> +        UNQUOTE_QUOTES          = 3,
> +        UNQUOTE_SEPARATOR_SPLIT = 4,
>  } UnquoteFlags;

Thanks to Ronny pointing out how to run the test suite, I have determined that
this causes every use of unquote to attempt to unescape and relax the rules for
unpaired quotes.

I'll fix this up and extend the test suite with the new features.


More information about the systemd-devel mailing list