mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-28 09:55:57 +00:00
kvm tools: Ignore parameters after dashdash in 'kvm run'
This allows other commands to wrap 'kvm run' and use the parameters user provides after a dash-dash for it's own use. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
+6
-1
@@ -777,8 +777,13 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix)
|
||||
|
||||
while (argc != 0) {
|
||||
argc = parse_options(argc, argv, options, run_usage,
|
||||
PARSE_OPT_STOP_AT_NON_OPTION);
|
||||
PARSE_OPT_STOP_AT_NON_OPTION |
|
||||
PARSE_OPT_KEEP_DASHDASH);
|
||||
if (argc != 0) {
|
||||
/* Cusrom options, should have been handled elsewhere */
|
||||
if (strcmp(argv[0], "--") == 0)
|
||||
break;
|
||||
|
||||
if (kernel_filename) {
|
||||
fprintf(stderr, "Cannot handle parameter: "
|
||||
"%s\n", argv[0]);
|
||||
|
||||
Reference in New Issue
Block a user