From patchwork Sat Jul 7 11:09:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Sitnicki X-Patchwork-Id: 940804 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41N8CL1s1Gz9s0n for ; Sat, 7 Jul 2018 21:15:26 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C6E7BCC8; Sat, 7 Jul 2018 11:10:26 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id E7466C9D for ; Sat, 7 Jul 2018 11:10:23 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7616476E for ; Sat, 7 Jul 2018 11:10:23 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id h10-v6so6400151wre.6 for ; Sat, 07 Jul 2018 04:10:23 -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:subject:date:message-id:in-reply-to :references; bh=cKYb7mk5awi7oTESTde7My2/XM6hhwOlYWwJN9lS7T4=; b=V4+w76dLkVIAzkhNWBsV0MTEUNne1SsBp8jOi5n9jtv/ucBCQwXTXQIX+i44Ef68kQ CUSR0v1zuU371SdKEp0RFYaoguOSpNepexFAFeiFtgfeoRzPAtFBNRNUMDIDws5VCKdi KDUsoNolr/J3PiU1UaTJSglXE3vfNHJnUs/Y5Oydv/3rP2Aq6X/TBfEkSKEzBdfJslBm 2/7CASw7ZmpOUGfN0BcJbo0KaN+ww6gWhg252kyabtM6lzsSQUvBAHpH2K//u0+Fqud+ EmaLbDZbhyBrMIBzKdyZNuZyhEW+806l7FLp6qorfyp60Dvc1OEfAMbPem/3Tmtcmnwy LHyA== X-Gm-Message-State: APt69E2mQVvj3N9udtCWBNoRoi6IYulaCVlwACZf18/LRcZzBzqkh2tp fcQTXdF+h1YiiANTLcpW1H6cgbCujX0= X-Google-Smtp-Source: AAOMgpdGO+JHiywUZWBri7UUFbbXV0G9AjurOz2SFn6B3F76xfSNF1jraFKALnIsYzvWAK9WoljCdA== X-Received: by 2002:adf:e642:: with SMTP id b2-v6mr11104141wrn.254.1530961821938; Sat, 07 Jul 2018 04:10:21 -0700 (PDT) Received: from redhat.com (218.red-2-136-166.dynamicip.rima-tde.net. [2.136.166.218]) by smtp.gmail.com with ESMTPSA id s12-v6sm14202339wrf.0.2018.07.07.04.10.21 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 07 Jul 2018 04:10:21 -0700 (PDT) From: Jakub Sitnicki To: dev@openvswitch.org Date: Sat, 7 Jul 2018 13:09:45 +0200 Message-Id: <20180707111004.8320-12-jkbs@redhat.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180707111004.8320-1-jkbs@redhat.com> References: <20180707111004.8320-1-jkbs@redhat.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 11/30] ovn-nbctl: Don't die in nbctl_ls_del(). X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Propagate the error via the context instead. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index d331c93c0..c0e068c38 100644 --- a/ovn/utilities/ovn-nbctl.c +++ b/ovn/utilities/ovn-nbctl.c @@ -889,7 +889,8 @@ nbctl_ls_del(struct ctl_context *ctx) char *error = ls_by_name_or_uuid(ctx, id, must_exist, &ls); if (error) { - ctl_fatal("%s", error); + ctx->error = error; + return; } if (!ls) { return;