]> git.meshlink.io Git - catta/commitdiff
Fix error message when passing an invalid command line option (Closes #88)
authorLennart Poettering <lennart@poettering.net>
Sun, 31 Dec 2006 16:52:13 +0000 (16:52 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 31 Dec 2006 16:52:13 +0000 (16:52 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1358 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-autoipd/main.c
avahi-daemon/main.c
avahi-dnsconfd/main.c
avahi-utils/avahi-browse.c
avahi-utils/avahi-publish.c
avahi-utils/avahi-resolve.c
avahi-utils/avahi-set-host-name.c

index ff2cfee6e48cac5ec2699be80a797890690cf778..60fc8aa01719cf7a971060d0984d8f57935e8e2e 100644 (file)
@@ -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;
         }
     }
index 6d8abb153e98eccc83297568575f02c28e9b49e4..33f12650226b203a617b51105cc4d8c5d12b8b0f 100644 (file)
@@ -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;
         }
     }
index d2fcf713a13ac19d115c92d97c0c365c6f5a26f2..1f3e3b8f2af1d1e007192a124e5e996bb40d738b 100644 (file)
@@ -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;
         }
     }
index 248b6518b28b5af36420f2177791f858beaa2a7b..faa8f8a2f6c0d4fbde6ffe6f50a6de849ae14a15 100644 (file)
@@ -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;
         }
     }
index 77dc42276bb2f038630c4b4e8d1df64c59091b23..4edca6ffa2483900ef9b28937761cbcce293eba6 100644 (file)
@@ -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;
         }
     }
index 9b1d517d1e78bfaacdedb6e6afdaf657a5d44bf2..fe01ae5dc943aad4a98108f7375ab8005bf50ce1 100644 (file)
@@ -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;
         }
     }
index 06f532244352f3850aa0b01bc9023a1494893282..8672e4e4580cc14c521c84e37f437ef1b0b0f0f0 100644 (file)
@@ -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;
         }
     }