Skip to contentSkip to conversation

rt-tests: cyclicdeadline: fix getopt string

PATCH In review Kurt Kanzenbach 2 participants 2 messages Apr 2, 2019 – Apr 3, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt-tests: cyclicdeadline: fix getopt string

There is code to parse the interval and step parameters from the command line. However, these options cannot be set, because the getopt string is incomplete. Adjust it accordingly to make '-i' and '-s' work.

---
 src/sched_deadline/cyclicdeadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/sched_deadline/cyclicdeadline.c +1 -1
index 761f8d7d7483..08460107c464 100644
@@ -1062,7 +1062,7 @@ int main (int argc, char **argv)
 		exit(-1);
 	}
 
-	while ((c = getopt(argc, argv, "+hac:t:")) >= 0) {
+	while ((c = getopt(argc, argv, "+hac:i:s:t:")) >= 0) {
 		switch (c) {
 		case 'a':
 			all_cpus = 1;
Signature · 1 line
2.11.0
#1 lore raw
Quoted 24 lines · Kurt Kanzenbach

There is code to parse the interval and step parameters from the command line. However, these options cannot be set, because the getopt string is incomplete. Adjust it accordingly to make '-i' and '-s' work.

---
 src/sched_deadline/cyclicdeadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/sched_deadline/cyclicdeadline.c +1 -1
index 761f8d7d7483..08460107c464 100644
@@ -1062,7 +1062,7 @@ int main (int argc, char **argv)
 		exit(-1);
 	}
 
-	while ((c = getopt(argc, argv, "+hac:t:")) >= 0) {
+	while ((c = getopt(argc, argv, "+hac:i:s:t:")) >= 0) {
 		switch (c) {
 		case 'a':
 			all_cpus = 1;
Signature · 1 line
2.11.0