Message ID | 1a792397f896fe2c5106eb55e58d0e3c8a3032c3.1345016001.git.phrdina@redhat.com |
---|---|
State | New |
Headers | show |
On Wed, 15 Aug 2012 09:41:42 +0200 Pavel Hrdina <phrdina@redhat.com> wrote: > Signed-off-by: Pavel Hrdina <phrdina@redhat.com> > --- > qerror.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/qerror.h b/qerror.h > index d0a76a4..7e0bae7 100644 > --- a/qerror.h > +++ b/qerror.h > @@ -120,6 +120,9 @@ void assert_no_error(Error *err); > #define QERR_FEATURE_DISABLED \ > ERROR_CLASS_GENERIC_ERROR, "The feature '%s' is not enabled" > > +#define QERR_GENERIC_ERROR \ > + ERROR_CLASS_GENERIC_ERROR, "An (Errno %d) error has occurred" > + You should use error_setg() instead: http://lists.gnu.org/archive/html/qemu-devel/2012-08/msg04980.html There usage examples in the series introducing it. It would be better to wait for it to be merged before you use it though, as it's always possible for people to ask for changes. > #define QERR_INVALID_BLOCK_FORMAT \ > ERROR_CLASS_GENERIC_ERROR, "Invalid block format '%s'" >
On 08/30/2012 02:11 PM, Luiz Capitulino wrote: > On Wed, 15 Aug 2012 09:41:42 +0200 > Pavel Hrdina <phrdina@redhat.com> wrote: > >> Signed-off-by: Pavel Hrdina <phrdina@redhat.com> >> --- >> qerror.h | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/qerror.h b/qerror.h >> index d0a76a4..7e0bae7 100644 >> --- a/qerror.h >> +++ b/qerror.h >> @@ -120,6 +120,9 @@ void assert_no_error(Error *err); >> #define QERR_FEATURE_DISABLED \ >> ERROR_CLASS_GENERIC_ERROR, "The feature '%s' is not enabled" >> >> +#define QERR_GENERIC_ERROR \ >> + ERROR_CLASS_GENERIC_ERROR, "An (Errno %d) error has occurred" >> + > You should use error_setg() instead: I'll fix it for whole patch-series. > > http://lists.gnu.org/archive/html/qemu-devel/2012-08/msg04980.html > > There usage examples in the series introducing it. It would be better > to wait for it to be merged before you use it though, as it's always > possible for people to ask for changes. > >> #define QERR_INVALID_BLOCK_FORMAT \ >> ERROR_CLASS_GENERIC_ERROR, "Invalid block format '%s'" >>
diff --git a/qerror.h b/qerror.h index d0a76a4..7e0bae7 100644 --- a/qerror.h +++ b/qerror.h @@ -120,6 +120,9 @@ void assert_no_error(Error *err); #define QERR_FEATURE_DISABLED \ ERROR_CLASS_GENERIC_ERROR, "The feature '%s' is not enabled" +#define QERR_GENERIC_ERROR \ + ERROR_CLASS_GENERIC_ERROR, "An (Errno %d) error has occurred" + #define QERR_INVALID_BLOCK_FORMAT \ ERROR_CLASS_GENERIC_ERROR, "Invalid block format '%s'"
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- qerror.h | 3 +++ 1 file changed, 3 insertions(+)