summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-03-27 09:50:02 +0100
committerGravatar Martin Szulecki2014-03-27 09:50:02 +0100
commit995f87c3df933197ae168d2f0bd4f8801edc97bb (patch)
tree776bf2311dc9ad10d313ab93fae6742089d1318d /tools
parent312a9cb0830f01268a2f85dd8f6fa6ea93463273 (diff)
downloadlibimobiledevice-995f87c3df933197ae168d2f0bd4f8801edc97bb.tar.gz
libimobiledevice-995f87c3df933197ae168d2f0bd4f8801edc97bb.tar.bz2
idevicename: Use lockdownd_get_device_name() helper
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicename.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/idevicename.c b/tools/idevicename.c
index c5f293d..7e4c372 100644
--- a/tools/idevicename.c
+++ b/tools/idevicename.c
@@ -91,16 +91,10 @@ int main(int argc, char** argv)
return -1;
}
- plist_t node = NULL;
-
if (argc == 0) {
// getting device name
char* name = NULL;
- lerr = lockdownd_get_value(lockdown, NULL, "DeviceName", &node);
- if (node) {
- plist_get_string_val(node, &name);
- plist_free(node);
- }
+ lerr = lockdownd_get_device_name(lockdown, &name);
if (name) {
printf("%s\n", name);
free(name);