Date: Mon, 30 Nov 2020 20:28:58 -0600 From: Kyle Evans <kevans@freebsd.org> To: Gleb Smirnoff <glebius@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org> Subject: Re: svn commit: r368197 - head/sbin/bectl Message-ID: <CACNAnaEMtsNRgHPM1pRm9RJzf3ex9w8qNHjLg8gjm%2B8nJ2F0zg@mail.gmail.com> In-Reply-To: <202011302105.0AUL5VHd035423@repo.freebsd.org>
index | next in thread | previous in thread | raw e-mail
On Mon, Nov 30, 2020 at 3:05 PM Gleb Smirnoff <glebius@freebsd.org> 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 Evanshome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaEMtsNRgHPM1pRm9RJzf3ex9w8qNHjLg8gjm%2B8nJ2F0zg>
