svn commit: r368197 - head/sbin/bectl
Kyle Evans
kevans at freebsd.org
Tue Dec 1 02:29:10 UTC 2020
On Mon, Nov 30, 2020 at 3:05 PM Gleb Smirnoff <glebius at 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 Evans
More information about the svn-src-head
mailing list