From patchwork Wed Jul 25 08:24:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Long X-Patchwork-Id: 10543677 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 C19A0157A for ; Wed, 25 Jul 2018 08:24:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADB581FFCA for ; Wed, 25 Jul 2018 08:24:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1262209CE; Wed, 25 Jul 2018 08:24:57 +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 8A46C1FFCA for ; Wed, 25 Jul 2018 08:24:56 +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 0737160A9531; Wed, 25 Jul 2018 08:24:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 bastion01.phx2.fedoraproject.org 0737160A9531 Received: from mailman01.phx2.fedoraproject.org (localhost [IPv6:::1]) by mailman01.phx2.fedoraproject.org (Postfix) with ESMTP id F1B9521B552E7; Wed, 25 Jul 2018 08:24:54 +0000 (UTC) Received: by mailman01.phx2.fedoraproject.org (Postfix, from userid 991) id 4623B21B552E7; Wed, 25 Jul 2018 08:24:52 +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 665E721B552E4 for ; Wed, 25 Jul 2018 08:24:50 +0000 (UTC) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) (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 E74E2605CE43 for ; Wed, 25 Jul 2018 08:24:49 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id u24-v6so1553716pfn.13 for ; Wed, 25 Jul 2018 01:24:49 -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=QlFDEQk+PdtubSP9+YMgr1UsxuHUjhiXO6pvBocxHOA=; b=Oi8VQ3e4vZ98UM0ppL49u/HbG4u0YrfO+dMU6ai40BeEqF4FD2nOV0BPSU8EMARpS5 U2LNNYPyY9zT6DfjPHS/4AvMAAHFMG1FtQn6Mtw8Kt7pEBo5DVx0S3dWnHXT/AETnWjb gw3ywMrD6A3mJ3n9LKzBTKRObitT+coRHj0SJRVkwr3TateSNYZ4yA6yU7RN0lLoGWn1 cVfGN7dlF0em8ru0gulezA4wcpbHwU9AFmxfswzH/P4OnSrJD8dyBcoaguP5GPqY76Xd BbpMXvDVHUGFs+n8K2u9nMySJundnrwLLnjTzCzCpCL6S58hCUuPacPnRC7xSMCVzJX2 NF3g== X-Gm-Message-State: AOUpUlFG/y8yT5i/LOoZbbRcuNBNIitQv+6DbqCVgadnmQxpCsfyiYia cGDXOunIFtDPj+G4pPtwndxFeJP5 X-Google-Smtp-Source: AAOMgpeP/8fSYCFPkCFsMgj8/5Mo+08ewsPAfjUdovnWj/Pa8q1h2EMxvzdmGOAMNb7fU/c5X6Vrnw== X-Received: by 2002:a63:8648:: with SMTP id x69-v6mr19553870pgd.172.1532507088845; Wed, 25 Jul 2018 01:24:48 -0700 (PDT) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id 14-v6sm23093787pft.93.2018.07.25.01.24.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jul 2018 01:24:48 -0700 (PDT) From: Xin Long To: libteam@lists.fedorahosted.org Subject: [PATCH] utils: check to_stdout return correctly in bond2team Date: Wed, 25 Jul 2018 16:24:40 +0800 Message-Id: X-Mailer: git-send-email 2.1.0 Message-ID-Hash: FXMGBYFUUCEGCIW2ITJKCQKYORKNRC7K X-Message-ID-Hash: FXMGBYFUUCEGCIW2ITJKCQKYORKNRC7K 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. Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool") Signed-off-by: Xin Long --- utils/bond2team | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/bond2team b/utils/bond2team index f8d46ef..1a3d7d6 100755 --- a/utils/bond2team +++ b/utils/bond2team @@ -623,9 +623,7 @@ team_ifcfg_write() team_ifcfg_deliver() { pr_dbg "${FUNCNAME} $*" - if [ ! to_stdout ]; then - return 0 - fi + to_stdout || return 0 if [ -z "${OUTPUT_DIR}" ]; then show_output_files