summaryrefslogtreecommitdiff
path: root/src/mediactl.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-08-22 18:20:59 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-08-22 18:21:47 +0200
commit8762373646cfea5549dc80b36b79e0b8a2e43207 (patch)
tree0ae893988c07ba3540a870c2dd5ccfc387d359cf /src/mediactl.c
parentad5e33515a209a72b66d7888a871427f9059e38a (diff)
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 <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/mediactl.c')
-rw-r--r--src/mediactl.c6
1 files changed, 3 insertions, 3 deletions
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;