Make remove-mdev command more intuitive
ramesh.thomas at intel.com
cover Make remove-mdev command more intuitive
From: Ramesh Thomas <ramesh.thomas(a)intel.com>
remove-mdev has an option to remove all mdevs if null uuid is passed as parameter. Null uuid is not easy for user to type in because it is long and needs to be in the uuid format. Change the command to take "all" as a special parameter value to indicate removal of all mdeves.
Ramesh Thomas (2):
accel-config: Make remove-mdev cmd "remove all" option more intuitive
accel-config: Update manpages with change to remove-mdev command
Documentation/accfg/accel-config-remove-mdev.txt | 5 ++--- accfg/mdev.c | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-)
Signature · 1 line
2.26.3
ramesh.thomas at intel.com
PATCH 1/2 accel-config: Make remove-mdev cmd "remove all" option more intuitive
From: Ramesh Thomas <ramesh.thomas(a)intel.com>
Currently user needs to pass a null uuid to remove all mdevs. Null uuid string is too long and needs to be in the uuid format which is not easy for user to remember and type. Add support for a special parameter "all" to indicate removall of all mdevs.
--- accfg/mdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
accfg/mdev.c +4 -2
@@ -130,7 +130,7 @@ int cmd_remove_mdev(int argc, const char **argv, void *ctx)const char *const u[] = {"accfg remove-mdev <device name> [<uuid>|<options>]" , -"Pass null uuid to remove all mdevs" , +"Pass \"all\" to remove all mdevs" ,NULL };
@@ -152,7 +152,9 @@ int cmd_remove_mdev(int argc, const char **argv, void *ctx)if (opt_called)return 0 ; -if (uuid_parse (argv[1 ], uuid) <0 ) { +if (!strcmp (argv[1 ],"all" )) +uuid_clear (uuid); +else if (uuid_parse (argv[1 ], uuid) <0 ) {fprintf (stderr,"Invalid uuid\n" );usage_with_options (u, options); }
Signature · 1 line
2.26.3
ramesh.thomas at intel.com
PATCH 2/2 accel-config: Update manpages with change to remove-mdev command
In reply to ramesh.thomas at intel.comFrom: Ramesh Thomas <ramesh.thomas(a)intel.com>
Update manpages with the new method to remove all mdevs by passing a specal parameter "all"
--- Documentation/accfg/accel-config-remove-mdev.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Documentation/accfg/accel-config-remove-mdev.txt +2 -3
@@ -6,8 +6,7 @@ accel-config-remove-mdev(1) NAME ---- accel-config-remove-mdev - remove mdev of a device associated with -the passed uuid. Passing a null uuid will remove all mdevs of the -device. +the passed uuid. Passing "all" will remove all mdevs of the device. SYNOPSIS --------
@@ -18,7 +17,7 @@ EXAMPLE ------- accel-config remove-mdev dsa0 0f34f0ed-6f67-4086-a4b7-8e1ecf077dce -accel-config remove-mdev dsa0 00000000-0000-0000-0000-000000000000 +accel-config remove-mdev dsa0 all accel-config remove-mdev dsa0 -l ----
Signature · 1 line
2.26.3
Dave Jiang
Reviewed-by on the v1 seriesQuoted 6 lines · ramesh.thomas(a)intel.com
From: Ramesh Thomas <ramesh.thomas(a)intel.com>
remove-mdev has an option to remove all mdevs if null uuid is passed as parameter. Null uuid is not easy for user to type in because it is long and needs to be in the uuid format. Change the command to take "all" as a special parameter value to indicate removal of all mdeves.
This is def better.
Quoted 9 lines
Ramesh Thomas (2):
accel-config: Make remove-mdev cmd "remove all" option more intuitive
accel-config: Update manpages with change to remove-mdev commandDocumentation/accfg/accel-config-remove-mdev.txt | 5 ++--- accfg/mdev.c | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-)