From patchwork Fri Jul 27 09:07:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Long X-Patchwork-Id: 10546769 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ED4FF174A for ; Fri, 27 Jul 2018 09:08:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB8522B1F8 for ; Fri, 27 Jul 2018 09:08:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFA502B1FC; Fri, 27 Jul 2018 09:08:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from bastion.fedoraproject.org (bastion01.fedoraproject.org [209.132.181.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 798352B1F8 for ; Fri, 27 Jul 2018 09:08:00 +0000 (UTC) Received: from mailman01.phx2.fedoraproject.org (mailman01.phx2.fedoraproject.org [10.5.126.36]) by bastion01.phx2.fedoraproject.org (Postfix) with ESMTP id 98C3F606FD90; Fri, 27 Jul 2018 09:07:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 bastion01.phx2.fedoraproject.org 98C3F606FD90 Received: from mailman01.phx2.fedoraproject.org (localhost [IPv6:::1]) by mailman01.phx2.fedoraproject.org (Postfix) with ESMTP id 8AA47205C0ACF; Fri, 27 Jul 2018 09:07:59 +0000 (UTC) Received: by mailman01.phx2.fedoraproject.org (Postfix, from userid 991) id EF28A205C0AD2; Fri, 27 Jul 2018 09:07:56 +0000 (UTC) Received: from smtp-mm-ib01.fedoraproject.org (smtp-mm-ib01.vpn.fedoraproject.org [192.168.1.83]) by mailman01.phx2.fedoraproject.org (Postfix) with ESMTP id 6C4C6205C0ACF for ; Fri, 27 Jul 2018 09:07:56 +0000 (UTC) Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by smtp-mm-ib01.fedoraproject.org (Postfix) with ESMTPS id 00603605D2EC for ; Fri, 27 Jul 2018 09:07:56 +0000 (UTC) Received: by mail-pl0-f66.google.com with SMTP id s17-v6so2060356plp.7 for ; Fri, 27 Jul 2018 02:07:55 -0700 (PDT) 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; bh=5WpA4Wlu3z9l1nHkKzz9/1lrDiwnzDV3J2WTu8jPk1Q=; b=VEOUdflAk9LJtqRrfQrOjdfixP75goTFmghp1VT+QX55vXrEYEw5lYQUzzxrqjOnKG 98XVZk+LBMlmegnTj9+DfWrN6K5AqFlg2QfTC/8EfWHmyBg7QNu0/bHnx+qPPX2LW/kn mUn25aG8S4kWT45VSiRt8kiu5/9gPiDVWmcLtTTYUQ7J4Ig70kiAST7vaie82IVkWfFr 7uVapg4LZBE2PWc2QWx4ZsFUpoLYVl9g5OZjO4TpBjhCEf7rFOF6c99PjHIeJMZJN2Do UeKv4VxXpTwosZEn7vXHIlceqFyUJHD165ihHVU+dZ8AiNIiD2hAn0BPEPj3qkDZVkGo ENWw== X-Gm-Message-State: AOUpUlEdXqxasDuMTTpcQfwgyM8Skh/M0VYZIPD/wlPGrKGznV6awvYC zZZSwM7LeC3mCdHial3TKZXt3a56 X-Google-Smtp-Source: AAOMgpeN1WFgKqnGvVxGEl7VlH1YoWJ1nXW5hFgeSF7iiYcjKv+RjG2pp0SANC9KBG5X+Du4WTh7rw== X-Received: by 2002:a17:902:1007:: with SMTP id b7-v6mr5191323pla.277.1532682474965; Fri, 27 Jul 2018 02:07:54 -0700 (PDT) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id b20-v6sm11457689pfc.178.2018.07.27.02.07.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jul 2018 02:07:54 -0700 (PDT) From: Xin Long To: libteam@lists.fedorahosted.org Subject: [PATCHv2] utils: check to_stdout return correctly in bond2team Date: Fri, 27 Jul 2018 17:07:47 +0800 Message-Id: <54198f458e81100e0b0bad5c5b78ea577fff59cc.1532682467.git.lucien.xin@gmail.com> X-Mailer: git-send-email 2.1.0 Message-ID-Hash: XFLOBWUS6BABSNCJADWKTBX5R2Q75DXZ X-Message-ID-Hash: XFLOBWUS6BABSNCJADWKTBX5R2Q75DXZ X-MailFrom: lucien.xin@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Jiri Pirko , Flavio Leitner X-Mailman-Version: 3.1.1 Precedence: list List-Id: Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP to_stdout is a function, not a string, so fix the check on its return in bond2team. v1->v2: improve the coding style as Flavio suggested. Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool") Signed-off-by: Xin Long Acked-by: Flavio Leitner --- utils/bond2team | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/bond2team b/utils/bond2team index f8d46ef..fc81c4b 100755 --- a/utils/bond2team +++ b/utils/bond2team @@ -623,7 +623,7 @@ team_ifcfg_write() team_ifcfg_deliver() { pr_dbg "${FUNCNAME} $*" - if [ ! to_stdout ]; then + if ! to_stdout; then return 0 fi