summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-06-18 23:16:18 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2017-06-18 23:16:18 +0200
commit37a945d203873a7c4e49ce5506385e82c0001d0b (patch)
tree5bc134871484c915644286a336bc10a1cb9e5e81 /utils
parent91ede1ea08ae217ccd22cdc936e474cdc0a4466c (diff)
downloadrockbox-37a945d203873a7c4e49ce5506385e82c0001d0b.tar.gz
rockbox-37a945d203873a7c4e49ce5506385e82c0001d0b.tar.bz2
rockbox-37a945d203873a7c4e49ce5506385e82c0001d0b.zip
nwztools/scsitool: add a command to query multiple nvp nodes at once
Change-Id: I89fed904b282a202bc845b08f4c8d1200a49636d
Diffstat (limited to 'utils')
-rw-r--r--utils/nwztools/scsitools/scsitool.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/nwztools/scsitools/scsitool.c b/utils/nwztools/scsitools/scsitool.c
index a90729a3d5..7b8ffd5f17 100644
--- a/utils/nwztools/scsitools/scsitool.c
+++ b/utils/nwztools/scsitools/scsitool.c
@@ -512,6 +512,22 @@ int get_dnk_nvp(int argc, char **argv)
return 0;
}
+int get_dnk_nvp_multi(int argc, char **argv)
+{
+ if(argc == 0)
+ {
+ printf("You must specify one or more node names\n");
+ printf("usage: <node1> <node2> <node3> ..\n");
+ printf("Nodes:\n");
+ for(unsigned i = 0; i < NWZ_NVP_COUNT; i++)
+ printf(" %-6s%s\n", nwz_nvp[i].name, nwz_nvp[i].desc);
+ return 1;
+ }
+ for(int i = 0; i < argc; i++)
+ get_dnk_nvp(1, &argv[i]);
+ return 0;
+}
+
struct dpcc_devinfo_t
{
uint8_t vendor_identification[8];
@@ -898,6 +914,7 @@ struct cmd_t cmd_list[] =
{
{ "get_dnk_prop", "Get DNK property", get_dnk_prop },
{ "get_dnk_nvp", "Get DNK NVP content", get_dnk_nvp },
+ { "get_dnk_nvp_multi", "Get several DNK NVP content", get_dnk_nvp_multi },
{ "get_dpcc_prop", "Get DPCC property", get_dpcc_prop },
{ "get_user_time", "Get user time", get_user_time },
{ "get_dev_info", "Get device info", get_dev_info },