Message ID | 20230201054522.162611-1-shahuang@redhat.com |
---|---|
State | Accepted |
Commit | 7ae69d7087a9a4d014e11b5328a49091cc1682f8 |
Headers | show |
Series | selftests: KVM: Replace optarg with arg in guest_modes_cmdline | expand |
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; }