[Bug 233178] FreeBSD 12.0-BETA - bectl create NEWBE - multiple error messages instead of one

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 233178] FreeBSD 12.0-BETA - bectl create NEWBE - multiple error messages instead of one

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233178

            Bug ID: 233178
           Summary: FreeBSD 12.0-BETA - bectl create NEWBE - multiple
                    error messages instead of one
           Product: Base System
           Version: 12.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: [hidden email]
          Reporter: [hidden email]

Currently:

# bectl create ZFSBE
boot environment name already taken
boot environment name already taken
boot environment name already taken
boot environment name already taken
failed to create bootenv ZFSBE
#

Can/should be:

# bectl create ZFSBE
boot environment ZFSBE already exists
#

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 233178] FreeBSD 12.0-BETA - bectl create NEWBE - multiple error messages instead of one

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233178

Rob <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
 Attachment #199243|                            |maintainer-approval?
              Flags|                            |

--- Comment #1 from Rob <[hidden email]> ---
Created attachment 199243
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=199243&action=edit
only call set_error() when an error is first encountered.

set_error() was previously being called multiple times for the same error.

This patch calls set_error() only when the type of error is known first-hand.
Once the error number is set, the error number is returned up the chain.

While this patch is by no means a robust fix, it does start to address the core
issue this bug originates from - which is inconsistent error handling within
libbe. What I mean by inconsistency is that, some routines within libbe return
an error number (without using set_error()) while other functions use
set_error() and then return an error number.

Hopefully this patch will be considered as a first-step to bringing consistent
error handling within libbe. An error should be set once, as soon as its known,
and the associated error number should be returned up the chain - eventually
making it's way to an application program, presumably.

The diff was taken from r340424 (HEAD), should it be against stable/12 branch?
This is my first patch submission, so bear with me.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 233178] FreeBSD 12.0-BETA - bectl create NEWBE - multiple error messages instead of one

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233178

Mark Linimon <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 233178] FreeBSD 12.0-BETA - bectl create NEWBE - multiple error messages instead of one

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233178

Kyle Evans <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
           Assignee|[hidden email]            |[hidden email]

--- Comment #2 from Kyle Evans <[hidden email]> ---
Take.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[hidden email]"