diff options
author | Nikias Bassen | 2022-04-30 13:31:20 +0200 |
---|---|---|
committer | Nikias Bassen | 2022-04-30 13:31:20 +0200 |
commit | 6cb13f9e6d3939930aecf91d8e23d1896a3b92e5 (patch) | |
tree | 371e4676ac914d9eef6bb4cfc0b5b6dc6f27da4f /tools/idevice_id.c | |
parent | 3b5cad28fabb236e05b8fff82fab5098127aa2bb (diff) | |
download | libimobiledevice-6cb13f9e6d3939930aecf91d8e23d1896a3b92e5.tar.gz libimobiledevice-6cb13f9e6d3939930aecf91d8e23d1896a3b92e5.tar.bz2 |
tools: Use getopt for option parsing in all tools
Diffstat (limited to 'tools/idevice_id.c')
-rw-r--r-- | tools/idevice_id.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/tools/idevice_id.c b/tools/idevice_id.c index 98fd22d..540a6f2 100644 --- a/tools/idevice_id.c +++ b/tools/idevice_id.c @@ -38,24 +38,23 @@ static void print_usage(int argc, char **argv, int is_error) { - char *name = NULL; - name = strrchr(argv[0], '/'); + char *name = strrchr(argv[0], '/'); fprintf(is_error ? stderr : stdout, "Usage: %s [OPTIONS] [UDID]\n", (name ? name + 1: argv[0])); fprintf(is_error ? stderr : stdout, + "\n" + "List attached devices or print device name of given device.\n" "\n" \ - "List attached devices or print device name of given device.\n" \ + " If UDID is given, the name of the connected device with that UDID" + " will be retrieved.\n" "\n" \ - " If UDID is given, the name of the connected device with that UDID" \ - " will be retrieved.\n" \ - "\n" \ - "OPTIONS:\n" \ - " -l, --list list UDIDs of all devices attached via USB\n" \ - " -n, --network list UDIDs of all devices available via network\n" \ - " -d, --debug enable communication debugging\n" \ - " -h, --help prints usage information\n" \ - " -v, --version prints version information\n" \ - "\n" \ - "Homepage: <" PACKAGE_URL ">\n" \ + "OPTIONS:\n" + " -l, --list list UDIDs of all devices attached via USB\n" + " -n, --network list UDIDs of all devices available via network\n" + " -d, --debug enable communication debugging\n" + " -h, --help prints usage information\n" + " -v, --version prints version information\n" + "\n" + "Homepage: <" PACKAGE_URL ">\n" "Bug Reports: <" PACKAGE_BUGREPORT ">\n" ); } |