All of lore.kernel.org
 help / color / mirror / Atom feed
From: "François Revol" <revol@free.fr>
To: Avi Kivity <avi@redhat.com>
Cc: haikuports-devs@ports.haiku-files.org, qemu-devel@nongnu.org
Subject: Re: [HaikuPorts-devs] [Qemu-devel] Re: [PATCH] [RFC] Haiku host support and general configure issues
Date: Mon, 09 Mar 2009 15:14:12 +0100 CET	[thread overview]
Message-ID: <3165008770-BeMail@laptop> (raw)
In-Reply-To: <49B4D5FE.7050409@redhat.com>

> Anthony Liguori wrote:
> >>
> >>> Another big issue that I mentionned earlier here is the widely
> > > > used
> >>> assumption that error codes are positive, which is not the case
> > > > for
> >>> BeOS and Haiku.
> >>> Not fixing this will result in a dangerous binary.
> >>
> >> Thanks for the reminder. But that also reminds me, you wanted to
> >> supply a patch for that! :)
> >
> > Such a patch may be something ya'll have to maintain on your own.
> > This has been discussed a lot in the past and I'm concerned that
> > it's
> > going to be too invasive.
>
> We could define a qemu_errno() which returns errno converted to
> positive
> numbers.  While it will touch a lot of places, I don't think it can
> be
> considered invasive.

I'm used to using the opposite, RETERR() returning always negative
codes from either errno or E*, and it works quite well.

I don't see the point in making stuff positive to return them negated.

Besides, one of the error codes in BeOS & Haiku will certainly overflow
on 32bit (B_NO_MEMORY = B_GENERAL_ERROR_BASE = LONG_MIN).

François.

  reply	other threads:[~2009-03-09 20:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-28 14:08 [Qemu-devel] [PATCH] [RFC] Haiku host support and general configure issues Andreas Färber
2009-02-28 17:08 ` [Qemu-devel] " François Revol
2009-02-28 18:31   ` Andreas Färber
2009-02-28 19:01     ` [HaikuPorts-devs] " François Revol
2009-02-28 20:26     ` Jamie Lokier
2009-02-28 20:32       ` François Revol
2009-03-08 18:15     ` Anthony Liguori
2009-03-08 18:41       ` [HaikuPorts-devs] " François Revol
2009-03-09  8:40       ` Avi Kivity
2009-03-09 14:14         ` François Revol [this message]
2009-03-09 14:33           ` [HaikuPorts-devs] " Avi Kivity
2009-03-09 15:39             ` François Revol

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=3165008770-BeMail@laptop \
    --to=revol@free.fr \
    --cc=avi@redhat.com \
    --cc=haikuports-devs@ports.haiku-files.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.