summaryrefslogtreecommitdiff
path: root/utils/nwztools/plattools/nwz_lib.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-10-28 23:27:29 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2016-10-28 23:27:29 +0200
commit3097239ce65c2eca659671c23dbacbefc398b9e7 (patch)
treed10a9ae5e04f42f1f22735bd2d44621fc1bf471e /utils/nwztools/plattools/nwz_lib.c
parent281c8d47000f591daae8c74c737825ecdccf4326 (diff)
downloadrockbox-3097239ce65c2eca659671c23dbacbefc398b9e7.tar.gz
rockbox-3097239ce65c2eca659671c23dbacbefc398b9e7.zip
nwztools/plattools: add device list
This list can map from model id to device name. It was automatically extracted from Sony's tools. In the future, we will probably generate it from a clean database containing more useful information. Change-Id: Ibe580edf25b60bf0bf4aef4a06f40dddd19c5404
Diffstat (limited to 'utils/nwztools/plattools/nwz_lib.c')
-rw-r--r--utils/nwztools/plattools/nwz_lib.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/nwztools/plattools/nwz_lib.c b/utils/nwztools/plattools/nwz_lib.c
index 4ea1edee19..ebfe488a7d 100644
--- a/utils/nwztools/plattools/nwz_lib.c
+++ b/utils/nwztools/plattools/nwz_lib.c
@@ -20,6 +20,16 @@
20 ****************************************************************************/ 20 ****************************************************************************/
21#include "nwz_lib.h" 21#include "nwz_lib.h"
22 22
23extern struct nwz_dev_info_t g_nwz_dev_list[];
24
25const char *nwz_get_model_name(unsigned long model_id)
26{
27 for(int i = 0; g_nwz_dev_list[i].name; i++)
28 if(g_nwz_dev_list[i].model_id == model_id)
29 return g_nwz_dev_list[i].name;
30 return NULL;
31}
32
23void nwz_run(const char *file, const char *args[], bool wait) 33void nwz_run(const char *file, const char *args[], bool wait)
24{ 34{
25 pid_t child_pid = fork(); 35 pid_t child_pid = fork();