Thread (9 messages) 9 messages, 5 authors, 2023-09-12

Re: [PATCH] vdpa: consume device_features parameter

From: Jason Wang <hidden>
Date: 2023-05-17 05:56:50
Also in: virtualization

On Sat, May 13, 2023 at 12:42 AM Shannon Nelson [off-list ref] wrote:
From: Allen Hubbe <allen.hubbe@amd.com>

Consume the parameter to device_features when parsing command line
options.  Otherwise the parameter may be used again as an option name.

 # vdpa dev add ... device_features 0xdeadbeef mac 00:11:22:33:44:55
 Unknown option "0xdeadbeef"

Fixes: a4442ce58ebb ("vdpa: allow provisioning device features")
Signed-off-by: Allen Hubbe <allen.hubbe@amd.com>
Reviewed-by: Shannon Nelson <redacted>
Acked-by: Jason Wang <redacted>

Thanks
quoted hunk ↗ jump to hunk
---
 vdpa/vdpa.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c
index 27647d73d498..8a2fca8647b6 100644
--- a/vdpa/vdpa.c
+++ b/vdpa/vdpa.c
@@ -353,6 +353,8 @@ static int vdpa_argv_parse(struct vdpa *vdpa, int argc, char **argv,
                                                &opts->device_features);
                        if (err)
                                return err;
+
+                       NEXT_ARG_FWD();
                        o_found |= VDPA_OPT_VDEV_FEATURES;
                } else {
                        fprintf(stderr, "Unknown option \"%s\"\n", *argv);
--
2.17.1
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help