diff options
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/iphoneinfo.c | 5 | ||||
| -rw-r--r-- | dev/syslog_relay.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/dev/iphoneinfo.c b/dev/iphoneinfo.c index 641b47d..18ee055 100644 --- a/dev/iphoneinfo.c +++ b/dev/iphoneinfo.c | |||
| @@ -158,7 +158,10 @@ int is_domain_known(char *domain) | |||
| 158 | void print_usage(int argc, char **argv) | 158 | void print_usage(int argc, char **argv) |
| 159 | { | 159 | { |
| 160 | int i = 0; | 160 | int i = 0; |
| 161 | printf("Usage: %s [OPTIONS]\n", (strrchr(argv[0], '/') + 1)); | 161 | char *name = NULL; |
| 162 | |||
| 163 | name = strrchr(argv[0], '/'); | ||
| 164 | printf("Usage: %s [OPTIONS]\n", (name ? name + 1: argv[0])); | ||
| 162 | printf("Show information about the first connected iPhone/iPod Touch.\n\n"); | 165 | printf("Show information about the first connected iPhone/iPod Touch.\n\n"); |
| 163 | printf(" -d, --debug\t\tenable communication debugging\n"); | 166 | printf(" -d, --debug\t\tenable communication debugging\n"); |
| 164 | printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n"); | 167 | printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n"); |
diff --git a/dev/syslog_relay.c b/dev/syslog_relay.c index e552e9c..6698653 100644 --- a/dev/syslog_relay.c +++ b/dev/syslog_relay.c | |||
| @@ -154,7 +154,10 @@ int main(int argc, char *argv[]) | |||
| 154 | 154 | ||
| 155 | void print_usage(int argc, char **argv) | 155 | void print_usage(int argc, char **argv) |
| 156 | { | 156 | { |
| 157 | printf("Usage: %s [OPTIONS]\n", (strrchr(argv[0], '/') + 1)); | 157 | char *name = NULL; |
| 158 | |||
| 159 | name = strrchr(argv[0], '/'); | ||
| 160 | printf("Usage: %s [OPTIONS]\n", (name ? name + 1: argv[0])); | ||
| 158 | printf("Relay syslog of a connected iPhone/iPod Touch.\n\n"); | 161 | printf("Relay syslog of a connected iPhone/iPod Touch.\n\n"); |
| 159 | printf(" -d, --debug\t\tenable communication debugging\n"); | 162 | printf(" -d, --debug\t\tenable communication debugging\n"); |
| 160 | printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n"); | 163 | printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n"); |
