diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2016-11-18 21:21:15 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2016-11-18 21:21:15 +0100 |
commit | 5e6ef6ca4e45a7ac5d994a631cb3763c1f5082f3 (patch) | |
tree | cb748e55606331357c29782be019104a7b38ab74 | |
parent | ec488431e64287d34861a88d0157b315d2a3ca41 (diff) | |
download | libmtp-5e6ef6ca4e45a7ac5d994a631cb3763c1f5082f3.tar.gz |
render opcodes as opcodes, not ofc.
render event names
-rw-r--r-- | src/libmtp.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/libmtp.c b/src/libmtp.c index 98aba7a..7bb5a7e 100644 --- a/src/libmtp.c +++ b/src/libmtp.c @@ -3167,19 +3167,14 @@ void LIBMTP_Dump_Device_Info(LIBMTP_mtpdevice_t *device) tmpext = tmpext->next; } printf("Supported operations:\n"); - for (i=0;i<params->deviceinfo.OperationsSupported_len;i++) { - char txt[256]; - - (void) ptp_render_ofc(params, params->deviceinfo.OperationsSupported[i], - sizeof(txt), txt); - printf(" %04x: %s\n", params->deviceinfo.OperationsSupported[i], txt); - } + for (i=0;i<params->deviceinfo.OperationsSupported_len;i++) + printf(" %04x: %s\n", params->deviceinfo.OperationsSupported[i], ptp_get_opcode_name(params, params->deviceinfo.OperationsSupported[i])); printf("Events supported:\n"); if (params->deviceinfo.EventsSupported_len == 0) { printf(" None.\n"); } else { for (i=0;i<params->deviceinfo.EventsSupported_len;i++) { - printf(" 0x%04x\n", params->deviceinfo.EventsSupported[i]); + printf(" 0x%04x (%s)\n", params->deviceinfo.EventsSupported[i], ptp_strerror(params->deviceinfo.EventsSupported[i], params->deviceinfo.VendorExtensionID)); } } printf("Device Properties Supported:\n"); |