mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests: KVM: Replace optarg with arg in guest_modes_cmdline
@ 2023-02-01  5:45 shahuang
  2023-02-01 16:00 ` Vipin Sharma
  0 siblings, 1 reply; 3+ messages in thread
From: shahuang @ 2023-02-01  5:45 UTC (permalink / raw)
  To: kvm
  Cc: Shaoqin Huang, Paolo Bonzini, Shuah Khan, Sean Christopherson,
	open list:KERNEL SELFTEST FRAMEWORK, open list

From: Shaoqin Huang <shahuang@redhat.com>

The parameter arg in guest_modes_cmdline not being used now, and the
optarg should be replaced with arg in guest_modes_cmdline.

Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
---
 tools/testing/selftests/kvm/lib/guest_modes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kvm/lib/guest_modes.c b/tools/testing/selftests/kvm/lib/guest_modes.c
index 99a575bbbc52..1f2dca4520ab 100644
--- a/tools/testing/selftests/kvm/lib/guest_modes.c
+++ b/tools/testing/selftests/kvm/lib/guest_modes.c
@@ -127,7 +127,7 @@ void guest_modes_cmdline(const char *arg)
 		mode_selected = true;
 	}
 
-	mode = strtoul(optarg, NULL, 10);
+	mode = strtoul(arg, NULL, 10);
 	TEST_ASSERT(mode < NUM_VM_MODES, "Guest mode ID %d too big", mode);
 	guest_modes[mode].enabled = true;
 }
-- 
2.39.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-02  2:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01  5:45 [PATCH] selftests: KVM: Replace optarg with arg in guest_modes_cmdline shahuang
2023-02-01 16:00 ` Vipin Sharma
2023-02-02  2:38   ` Shaoqin Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®