From 8bc7858318a61d998527212e0948a3c469922105 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 31 Dec 2006 16:52:13 +0000 Subject: [PATCH] Fix error message when passing an invalid command line option (Closes #88) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1358 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-autoipd/main.c | 2 +- avahi-daemon/main.c | 2 +- avahi-dnsconfd/main.c | 2 +- avahi-utils/avahi-browse.c | 2 +- avahi-utils/avahi-publish.c | 2 +- avahi-utils/avahi-resolve.c | 2 +- avahi-utils/avahi-set-host-name.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/avahi-autoipd/main.c b/avahi-autoipd/main.c index ff2cfee..60fc8aa 100644 --- a/avahi-autoipd/main.c +++ b/avahi-autoipd/main.c @@ -1259,7 +1259,7 @@ static int parse_command_line(int argc, char *argv[]) { #endif default: - fprintf(stderr, "Invalid command line argument: %c\n", c); + fprintf(stderr, "Invalid command line argument: %s\n", argv[optind-1]); return -1; } } diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index 6d8abb1..33f1265 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -426,7 +426,7 @@ static int parse_command_line(DaemonConfig *c, int argc, char *argv[]) { c->debug = 1; break; default: - fprintf(stderr, "Invalid command line argument: %c\n", o); + fprintf(stderr, "Invalid command line argument: %s\n", argv[optind-1]); return -1; } } diff --git a/avahi-dnsconfd/main.c b/avahi-dnsconfd/main.c index d2fcf71..1f3e3b8 100644 --- a/avahi-dnsconfd/main.c +++ b/avahi-dnsconfd/main.c @@ -419,7 +419,7 @@ static int parse_command_line(int argc, char *argv[]) { command = DAEMON_CHECK; break; default: - fprintf(stderr, "Invalid command line argument: %c\n", c); + fprintf(stderr, "Invalid command line argument: %s\n", argv[optind-1]); return -1; } } diff --git a/avahi-utils/avahi-browse.c b/avahi-utils/avahi-browse.c index 248b651..faa8f8a 100644 --- a/avahi-utils/avahi-browse.c +++ b/avahi-utils/avahi-browse.c @@ -686,7 +686,7 @@ static int parse_command_line(Config *c, const char *argv0, int argc, char *argv break; #endif default: - fprintf(stderr, "Invalid command line argument: %c\n", o); + fprintf(stderr, "Invalid command line argument: %s\n", argv[optind-1]); return -1; } } diff --git a/avahi-utils/avahi-publish.c b/avahi-utils/avahi-publish.c index 77dc422..4edca6f 100644 --- a/avahi-utils/avahi-publish.c +++ b/avahi-utils/avahi-publish.c @@ -290,7 +290,7 @@ static int parse_command_line(Config *c, const char *argv0, int argc, char *argv c->subtypes = avahi_string_list_add(c->subtypes, optarg); break; default: - fprintf(stderr, "Invalid command line argument: %c\n", o); + fprintf(stderr, "Invalid command line argument: %s\n", argv[optind-1]); return -1; } } diff --git a/avahi-utils/avahi-resolve.c b/avahi-utils/avahi-resolve.c index 9b1d517..fe01ae5 100644 --- a/avahi-utils/avahi-resolve.c +++ b/avahi-utils/avahi-resolve.c @@ -212,7 +212,7 @@ static int parse_command_line(Config *c, const char *argv0, int argc, char *argv c->proto = AVAHI_PROTO_INET6; break; default: - fprintf(stderr, "Invalid command line argument: %c\n", o); + fprintf(stderr, "Invalid command line argument: %s\n", argv[optind-1]); return -1; } } diff --git a/avahi-utils/avahi-set-host-name.c b/avahi-utils/avahi-set-host-name.c index 06f5322..8672e4e 100644 --- a/avahi-utils/avahi-set-host-name.c +++ b/avahi-utils/avahi-set-host-name.c @@ -107,7 +107,7 @@ static int parse_command_line(Config *c, int argc, char *argv[]) { c->verbose = 1; break; default: - fprintf(stderr, "Invalid command line argument: %c\n", o); + fprintf(stderr, "Invalid command line argument: %s\n", argv[optind-1]); return -1; } } -- 2.39.5