]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
client: complain if the provided format is not supported
authorVincent Bernat <vincent@bernat.im>
Sat, 9 May 2015 10:50:10 +0000 (12:50 +0200)
committerVincent Bernat <vincent@bernat.im>
Sat, 9 May 2015 10:50:10 +0000 (12:50 +0200)
src/client/lldpcli.c

index 8eeac70ed98c380b2e1f5b3e8b731f000628d58d..af6e0c3bc1d848447297c28c603190379de2f7a4 100644 (file)
@@ -277,7 +277,10 @@ cmd_exec(lldpctl_conn_t *conn, const char *fmt, int argc, const char **argv)
 #ifdef USE_JSONC
        else if (strcmp(fmt, "json")     == 0) w = jsonc_init(stdout);
 #endif
-       else w = txt_init(stdout);
+       else {
+               log_warnx("lldpctl", "unknown output format \"%s\"", fmt);
+               w = txt_init(stdout);
+       }
 
        /* Execute command */
        int rc = commands_execute(conn, w,