From: Luiz Capitulino <lcapitulino@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/6] QError: New QERR_FOPEN_FAILED
Date: Mon, 18 Jan 2010 14:49:51 -0200 [thread overview]
Message-ID: <20100118144951.41fd77b0@doriath> (raw)
In-Reply-To: <m34omjv52a.fsf@blackfin.pond.sub.org>
On Mon, 18 Jan 2010 15:52:13 +0100
Markus Armbruster <armbru@redhat.com> wrote:
> Luiz Capitulino <lcapitulino@redhat.com> writes:
>
> > On Fri, 15 Jan 2010 17:25:25 +0100
> > Markus Armbruster <armbru@redhat.com> wrote:
> >
> >>
> >> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> >> ---
> >> qerror.c | 4 ++++
> >> qerror.h | 3 +++
> >> 2 files changed, 7 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/qerror.c b/qerror.c
> >> index 5f8fc5d..e7b8ca7 100644
> >> --- a/qerror.c
> >> +++ b/qerror.c
> >> @@ -73,6 +73,10 @@ static const QErrorStringTable qerror_table[] = {
> >> .desc = "No file descriptor supplied via SCM_RIGHTS",
> >> },
> >> {
> >> + .error_fmt = QERR_FOPEN_FAILED,
> >> + .desc = "Could not open '%{filename}'",
> >> + },
> >
> > Shouldn't this be something like QERR_OPEN_FAILED, so that we
> > can use the same error for all open functions?
>
> Whatever name you like best. The intention is certainly to use this for
> *file* open errors regardless of the precise function used to open.
Probably OpenFileFailed or CantOpenFile.
> > Also, we have to think a way to specify the reason from errno.
>
> Yes only if client programs use this for handling the error, not just to
> pass it to a human user.
>
> Although most errors are standardized, their numeric encoding is not, so
> we can't just transmit errno. strerror() is right out, because that's
> for humans.
IIRC we had a conversation about this and the conclusion was that we
will need our own qerror_strerror() or something like that.
next prev parent reply other threads:[~2010-01-18 16:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 16:25 [Qemu-devel] [PATCH 0/6] Convert memsave, pmemsave, cpu to QObject+QError Markus Armbruster
2010-01-15 16:25 ` [Qemu-devel] [PATCH 1/6] monitor: Don't check for mon_get_cpu() failure Markus Armbruster
2010-01-15 16:25 ` [Qemu-devel] [PATCH 2/6] QError: New QERR_FOPEN_FAILED Markus Armbruster
2010-01-18 14:23 ` Luiz Capitulino
2010-01-18 14:38 ` Luiz Capitulino
2010-01-18 14:52 ` Markus Armbruster
2010-01-18 16:49 ` Luiz Capitulino [this message]
2010-01-15 16:25 ` [Qemu-devel] [PATCH 3/6] monitor: convert do_memory_save() to QError Markus Armbruster
2010-01-15 16:25 ` [Qemu-devel] [PATCH 4/6] monitor: convert do_physical_memory_save() " Markus Armbruster
2010-01-15 16:25 ` [Qemu-devel] [PATCH 5/6] QError: New QERR_INVALID_CPU_INDEX Markus Armbruster
2010-01-15 16:25 ` [Qemu-devel] [PATCH 6/6] monitor: convert do_cpu_set() to QObject, QError Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100118144951.41fd77b0@doriath \
--to=lcapitulino@redhat.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).