From patchwork Tue Oct 9 12:44:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 981210 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=nwl.cc Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42TyLf5FrZz9s89 for ; Wed, 10 Oct 2018 00:12:10 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727002AbeJIU3B (ORCPT ); Tue, 9 Oct 2018 16:29:01 -0400 Received: from orbyte.nwl.cc ([151.80.46.58]:33928 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbeJIU3A (ORCPT ); Tue, 9 Oct 2018 16:29:00 -0400 Received: from localhost ([::1]:41434 helo=tatos) by orbyte.nwl.cc with esmtp (Exim 4.90_1) (envelope-from ) id 1g9rN4-0007Gi-88; Tue, 09 Oct 2018 14:44:18 +0200 From: Phil Sutter To: Stephen Hemminger Cc: netdev@vger.kernel.org Subject: [iproute PATCH] bridge: fdb: Fix for missing keywords in non-JSON output Date: Tue, 9 Oct 2018 14:44:08 +0200 Message-Id: <20181009124408.7571-1-phil@nwl.cc> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org While migrating to JSON print library, some keywords were dropped from standard output by accident. Add them back to unbreak output parsers. Fixes: c7c1a1ef51aea ("bridge: colorize output and use JSON print library") Signed-off-by: Phil Sutter --- bridge/fdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridge/fdb.c b/bridge/fdb.c index 4dbc894ceab93..6487fac579c20 100644 --- a/bridge/fdb.c +++ b/bridge/fdb.c @@ -182,7 +182,7 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) if (!is_json_context()) fprintf(fp, "dev "); print_color_string(PRINT_ANY, COLOR_IFNAME, - "ifname", "%s ", + "ifname", "dev %s ", ll_index_to_name(r->ndm_ifindex)); } @@ -199,7 +199,7 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) print_color_string(PRINT_ANY, ifa_family_color(family), - "dst", "%s ", dst); + "dst", "dst %s ", dst); } if (vid) @@ -246,7 +246,7 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) if (tb[NDA_MASTER]) - print_string(PRINT_ANY, "master", "%s ", + print_string(PRINT_ANY, "master", "master %s ", ll_index_to_name(rta_getattr_u32(tb[NDA_MASTER]))); print_string(PRINT_ANY, "state", "%s\n",