From a742670827b8ffb553f3443b2f4bf1136a500e1d Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 9 May 2015 12:50:10 +0200 Subject: [PATCH] client: complain if the provided format is not supported --- src/client/lldpcli.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/lldpcli.c b/src/client/lldpcli.c index 8eeac70e..af6e0c3b 100644 --- a/src/client/lldpcli.c +++ b/src/client/lldpcli.c @@ -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, -- 2.39.5