Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Nov 2018 19:26:14 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 233178] FreeBSD 12.0-BETA - bectl create NEWBE - multiple error messages instead of one
Message-ID:  <bug-233178-227-STQRsDcnAw@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-233178-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-233178-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233178

Rob <rob.fx907@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rob.fx907@gmail.com
 Attachment #199243|                            |maintainer-approval?
              Flags|                            |

--- Comment #1 from Rob <rob.fx907@gmail.com> ---
Created attachment 199243
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D199243&action=
=3Dedit
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-han=
d.
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 ret=
urn
an error number (without using set_error()) while other functions use
set_error() and then return an error number.=20

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

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

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233178-227-STQRsDcnAw>