From owner-svn-src-all@freebsd.org Tue Dec 1 02:29:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60847468F85; Tue, 1 Dec 2020 02:29:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ClQyt2KR1z3MmJ; Tue, 1 Dec 2020 02:29:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 3C8324630; Tue, 1 Dec 2020 02:29:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f179.google.com with SMTP id u4so37256qkk.10; Mon, 30 Nov 2020 18:29:10 -0800 (PST) X-Gm-Message-State: AOAM531w3u2Ggiig3O/vVWeVnFKr2x56cn5KovcWccZ300pCrDsOtYG6 oBCaXxqt9QUCWs+Gj+mYeMRWDjzTTQCs04G49Ng= X-Google-Smtp-Source: ABdhPJw8QOkbAQn/0bN8osIueOCCXIj6JfI4BtS4AJLEzzn4KtD0QM9xBYousJ8VQwvAdl0DVLRHkrp7r845q+ZpODs= X-Received: by 2002:a37:9ecc:: with SMTP id h195mr734029qke.103.1606789749398; Mon, 30 Nov 2020 18:29:09 -0800 (PST) MIME-Version: 1.0 References: <202011302105.0AUL5VHd035423@repo.freebsd.org> In-Reply-To: <202011302105.0AUL5VHd035423@repo.freebsd.org> From: Kyle Evans Date: Mon, 30 Nov 2020 20:28:58 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r368197 - head/sbin/bectl To: Gleb Smirnoff Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2020 02:29:10 -0000 On Mon, Nov 30, 2020 at 3:05 PM Gleb Smirnoff wrote: > > Author: glebius > Date: Mon Nov 30 21:05:31 2020 > New Revision: 368197 > URL: https://svnweb.freebsd.org/changeset/base/368197 > > Log: > Print at least something when failing. > > Modified: > head/sbin/bectl/bectl.c > > Modified: head/sbin/bectl/bectl.c > ============================================================================== > --- head/sbin/bectl/bectl.c Mon Nov 30 20:58:42 2020 (r368196) > +++ head/sbin/bectl/bectl.c Mon Nov 30 21:05:31 2020 (r368197) > @@ -584,8 +584,11 @@ main(int argc, char *argv[]) > return (usage(false)); > } > > - if ((be = libbe_init(root)) == NULL) > + if ((be = libbe_init(root)) == NULL) { > + fprintf(stderr, "libbe_init(\"%s\") failed.\n", > + root != NULL ? root : ""); > return (-1); > + } > > libbe_print_on_error(be, !cmd->silent); > This should be gated on !cmd->silent, because some paths have consumers that are specifically designed to not have to deal with redirecting stderr. It was quite intentional that this didn't previously print anything. Thanks, Kyle Evans