From 8762373646cfea5549dc80b36b79e0b8a2e43207 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 22 Aug 2013 18:20:59 +0200 Subject: Support both " and ' as string delimiters when parsing the command line Entity names are enclosed in quotes. Support both double-quoted and single-quoted strings. Signed-off-by: Laurent Pinchart --- src/mediactl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mediactl.c b/src/mediactl.c index c854357..b22fbdf 100644 --- a/src/mediactl.c +++ b/src/mediactl.c @@ -541,9 +541,9 @@ struct media_pad *media_parse_pad(struct media_device *media, for (; isspace(*p); ++p); - if (*p == '"') { - for (end = (char *)p + 1; *end && *end != '"'; ++end); - if (*end != '"') { + if (*p == '"' || *p == '\'') { + for (end = (char *)p + 1; *end && *end != '"' && *end != '\''; ++end); + if (*end != '"' && *end != '\'') { media_dbg(media, "missing matching '\"'\n"); *endp = end; return NULL; -- cgit v1.2.3