Skip to contentSkip to conversation

alsatplg: fix topology compiler long option parsing

PATCH Applied Liam Girdwood 2 participants 2 messages Jun 14, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsatplg: fix topology compiler long option parsing

verbose, compile and output options all have a parameter.

---
 topology/topology.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
topology/topology.c +4 -4
index ffe2f05..097c255 100644
@@ -54,10 +54,10 @@ int main(int argc, char *argv[])
 	snd_tplg_t *snd_tplg;
 	static const char short_options[] = "hc:v:o:";
 	static const struct option long_options[] = {
-		{"help", 0, 0, 'h'},
-		{"verbose", 0, 0, 'v'},
-		{"compile", 0, 0, 'c'},
-		{"output", 0, 0, 'o'},
+		{"help", 0, NULL, 'h'},
+		{"verbose", 1, NULL, 'v'},
+		{"compile", 1, NULL, 'c'},
+		{"output", 1, NULL, 'o'},
 		{0, 0, 0, 0},
 	};
 	char *source_file = NULL, *output_file = NULL;
Signature · 1 line
1.9.1
Applied
#1 lore raw
Quoted 4 lines · Liam Girdwood

verbose, compile and output options all have a parameter.

Applied, thanks.

Takashi

Quoted 31 lines
---
 topology/topology.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
topology/topology.c +4 -4
index ffe2f05..097c255 100644
@@ -54,10 +54,10 @@ int main(int argc, char *argv[])
 	snd_tplg_t *snd_tplg;
 	static const char short_options[] = "hc:v:o:";
 	static const struct option long_options[] = {
-		{"help", 0, 0, 'h'},
-		{"verbose", 0, 0, 'v'},
-		{"compile", 0, 0, 'c'},
-		{"output", 0, 0, 'o'},
+		{"help", 0, NULL, 'h'},
+		{"verbose", 1, NULL, 'v'},
+		{"compile", 1, NULL, 'c'},
+		{"output", 1, NULL, 'o'},
 		{0, 0, 0, 0},
 	};
 	char *source_file = NULL, *output_file = NULL;
Signature · 6 lines
1.9.1

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel