qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} us


From: Rob Landley
Subject: Re: [Qemu-devel] [PATCH] ensure all invocations to bdrv_{read, write} use (uint8_t *) for its third parameter
Date: Fri, 4 Jan 2008 18:39:08 -0600
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)

On Friday 04 January 2008 07:41:29 Andreas Färber wrote:
> Am 04.01.2008 um 14:20 schrieb Thiemo Seufer:
> > Carlo Marcelo Arenas Belon wrote:
> >> Trivial fix that ensures that all buffers used for bdrv_read or
> >> bdrv_write
> >> are from an array of the uint8_t type
> >
> > Do we have a host where this actually makes a difference?
>
> I believe Perl makes sizeof(char) checks, so there likely is some
> platform where sizeof(char) > 1.

There's a difference between "what some now-obsolete HP minicomputer once did 
in 1987" and "an interesting system with nonzero potential deployments".

A system with sizeof(char)!=1 does not fall in the second category.  In fact, 
on Unix, "short", "int", and "long" all have defined sizes too.

Standard:
  http://www.unix.org/whitepapers/64bit.html
Rationale document:
  http://www.unix.org/version2/whatsnew/lp64_wp.html

Infrastructure in search of a user always bit rots.  Wait for somebody to 
complain, and _then_ add it, once a user has shown up who can test it (and 
detect its absence).

> Andreas

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]