From patchwork Thu Aug 3 15:54:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Fortin X-Patchwork-Id: 797271 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@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; dkim=pass (1024-bit key; unprotected) header.d=cumulusnetworks.com header.i=@cumulusnetworks.com header.b="aBRzL45f"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xNZQp3yCDz9s8V for ; Fri, 4 Aug 2017 01:55:46 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751899AbdHCPzn (ORCPT ); Thu, 3 Aug 2017 11:55:43 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:37219 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751865AbdHCPzk (ORCPT ); Thu, 3 Aug 2017 11:55:40 -0400 Received: by mail-wr0-f181.google.com with SMTP id 33so7384101wrz.4 for ; Thu, 03 Aug 2017 08:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AjQuz6VB3UK90OoRBT4f/TuXMI7PhY/ZYi+r4kA5608=; b=aBRzL45f5r8gb5GGWoqELGTkqRWqkfDW7yiIsfcp/XJylC0KDoLxAVMzCZyLMXG6na 6uXGEZRlJObGxSFXiDtvyVfmC97LOVXB62qPhk5RjBXBPAcC3vnbWBL0oX6O8ZO8R+2b r92goKKRR36rqLYziWzWanXi8li8QzcIRKp2g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AjQuz6VB3UK90OoRBT4f/TuXMI7PhY/ZYi+r4kA5608=; b=AP+iEyzMpl70RABl1xyqfPqWIn2X6v37Ru5BlahtPbwflG6RP2sCR7MWWg1SzSIsTc 5En29hkzE5+HSaWZeKjhKGMHSAG8PlFm+xO3iPlvcFxoHSrjCFM58GW9pcDCWp1WuWRl SI37cKbH+LCSxOWrSxQlWSDfb9D5q+zt3CzbZj9oaddZpTtmTbsBPqyrN/ccE2ukITeH QSLz2ZLfcEZ9RTiYHWr+sdlPLS3J4crGgp5NemGPFJo7evbtUQWMi/QVayQ/S06BXn5j +zorIMZjCt51r7niWNd31t7CEDY47XNzoIZHC3KCgAqkNhQQo9h68G6qhfDvb14ZQbdP eoIA== X-Gm-Message-State: AIVw112Hf4b+Bm4agBdLOzysiobisIkPRp14txDpBribIWSyzcl1CxTi xD9yqokRC1vilcxmE94= X-Received: by 10.223.178.85 with SMTP id y21mr1620650wra.92.1501775739317; Thu, 03 Aug 2017 08:55:39 -0700 (PDT) Received: from localhost.localdomain (91-160-18-219.subs.proxad.net. [91.160.18.219]) by smtp.googlemail.com with ESMTPSA id d91sm2213309wma.23.2017.08.03.08.55.38 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 03 Aug 2017 08:55:38 -0700 (PDT) From: Julien Fortin X-Google-Original-From: Julien Fortin To: netdev@vger.kernel.org Cc: roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com, dsa@cumulusnetworks.com, Julien Fortin Subject: [PATCH 06/27] ip: iplink.c: open/close json object for ip -brief -json link show dev DEV Date: Thu, 3 Aug 2017 17:54:54 +0200 Message-Id: <20170803155515.99226-7-julien@cumulusnetworks.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170803155515.99226-1-julien@cumulusnetworks.com> References: <20170803155515.99226-1-julien@cumulusnetworks.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Julien Fortin Signed-off-by: Julien Fortin --- ip/iplink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ip/iplink.c b/ip/iplink.c index 5aff2fde..19bda1b9 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -1041,10 +1041,12 @@ int iplink_get(unsigned int flags, char *name, __u32 filt_mask) if (rtnl_talk(&rth, &req.n, &answer.n, sizeof(answer)) < 0) return -2; + open_json_object(NULL); if (brief) print_linkinfo_brief(NULL, &answer.n, stdout, NULL); else print_linkinfo(NULL, &answer.n, stdout); + close_json_object(); return 0; }