From patchwork Thu Aug 17 17:35:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Fortin X-Patchwork-Id: 802793 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="EBYANY7W"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xYD5V1S6Kz9t4X for ; Fri, 18 Aug 2017 03:40:46 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753499AbdHQRko (ORCPT ); Thu, 17 Aug 2017 13:40:44 -0400 Received: from mail-wr0-f173.google.com ([209.85.128.173]:35122 "EHLO mail-wr0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753460AbdHQRkk (ORCPT ); Thu, 17 Aug 2017 13:40:40 -0400 Received: by mail-wr0-f173.google.com with SMTP id 49so41461857wrw.2 for ; Thu, 17 Aug 2017 10:40: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=eZ5Xk+SWoQaqPgXlUocerx33Px/+S1IIkRyitQzT7eg=; b=EBYANY7WuG/aXbmbP9YcSTw2+XBHCviA6Ho9rFv3gKxzJEL2RpjT/SjnQh0/iLwRpP CfQPRRT36VY4N1/2fqbOer8JBmzLCuBj0lOfaAsOc51cn2jkqN96hcy5AH6e1t7DxRPg 9PRq/LJNKacYx6Y5lnfqYisXiKkiMF9MOoUYo= 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=eZ5Xk+SWoQaqPgXlUocerx33Px/+S1IIkRyitQzT7eg=; b=ntZRD19hc3j1CNQYGlATneu8VYIAWvRf8Ect/tTlckqQQ71rEjH6hjnvNy+cVtiVlO MhrMOORGSC/4FzKwb28eD7/viLg76PVA3bxjRWx7sZ79UBAil4DpLtQdzJgqBZi6QZzb 8hARWdabP2cmJTH9pDNN+ce4BZoDnqrfFZQLovGQUXq6IQSHdJorI8u4aWVpX2kp0+yy YiN0p9waBQWG6AvOQbsRjXm3Axcz5eM8uSAypdg3ZE5AhZsTfzRGBmI80cnO+keq78iy ZSjLDdyCmfk/vH8f1DmgD3Vk6ZecysVoBRZaW1Ps9vAHDKutgB0KwshiZJP9Q+tK4h1M LRvQ== X-Gm-Message-State: AHYfb5gRtH+s7wrQgWCirfQ5iRVeGY3fw0fVpjhTiOCut+V2nr039DEy WKjWHnCgsDsoAro2fNVLNeyY X-Received: by 10.28.69.91 with SMTP id s88mr1912963wma.127.1502991639273; Thu, 17 Aug 2017 10:40:39 -0700 (PDT) Received: from localhost.localdomain ([37.169.21.172]) by smtp.googlemail.com with ESMTPSA id k13sm3902040wrd.4.2017.08.17.10.40.35 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 17 Aug 2017 10:40: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 iproute2 json v2 06/27] ip: iplink.c: open/close json obj for ip -brief -json link show dev DEV Date: Thu, 17 Aug 2017 10:35:53 -0700 Message-Id: <20170817173614.54987-7-julien@cumulusnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170817173614.54987-1-julien@cumulusnetworks.com> References: <20170817173614.54987-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; }