From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10DB7C2D0A3 for ; Mon, 9 Nov 2020 05:15:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A12E121534 for ; Mon, 9 Nov 2020 05:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604898913; bh=B+5LoD89zifUi6wF/rZ89OFlwvvrw6sY21Q9nHw4hAA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=yCcjUfk9ROQkUzasJgdCWTB37L0B6AyHvxbnNLPxVg+7M+hQ1fwH2Amgp6ilS0nzU tqqvu9ZKf3GG+VdnZDo+IJeXvAd7YxPUvsq1ZV0dFXLpcn9sn/4caLYS0c0bdzO7kj ZKxnS0DQNh6yYe1ruoau7letKH3RL9OjG8tGBa8Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729293AbgKIFPM (ORCPT ); Mon, 9 Nov 2020 00:15:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:48752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbgKIFPM (ORCPT ); Mon, 9 Nov 2020 00:15:12 -0500 Received: from localhost (searspoint.nvidia.com [216.228.112.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6472120897; Mon, 9 Nov 2020 05:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604898912; bh=B+5LoD89zifUi6wF/rZ89OFlwvvrw6sY21Q9nHw4hAA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vaBcXbbTiMMCta4dDaGiruGi+v9qY1kLjQdOuruqGkxA3M8o/3nBsLkpeYkuOlC4i eOySL5qDwbtFDz/y/+XfqqbmTFkeiY3ODAZOq73Py8xGGjqbk/E3b/xK3yyodgMk+Z B7r/g6mrVqEDZbLPCmCaSVM1uQgd99zYTcz5R3hA= Date: Mon, 9 Nov 2020 07:15:08 +0200 From: Leon Romanovsky To: Petr Machata Cc: netdev@vger.kernel.org, dsahern@gmail.com, stephen@networkplumber.org, john.fastabend@gmail.com, jiri@nvidia.com, idosch@nvidia.com, Jakub Kicinski , Roman Mashak Subject: Re: [PATCH iproute2-next v4 03/11] lib: json_print: Add print_on_off() Message-ID: <20201109051508.GB4527@unreal> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, Nov 08, 2020 at 10:14:08PM +0100, Petr Machata wrote: > The value of a number of booleans is shown as "on" and "off" in the plain > output, and as an actual boolean in JSON mode. Add a function that does > that. > > RDMA tool already uses a function named print_on_off(). This function > always shows "on" and "off", even in JSON mode. Since there are probably > very few if any consumers of this interface at this point, migrate it to > the new central print_on_off() as well. > > Signed-off-by: Petr Machata > --- Thanks, Reviewed-by: Leon Romanovsky