[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] DOSEMU image file support

From: Hampa Hug
Subject: Re: [Qemu-devel] [PATCH] DOSEMU image file support
Date: Tue, 14 Sep 2004 02:19:47 +0200

Fabrice Bellard wrote:
> Hampa Hug wrote:
> > Fabrice Bellard wrote:
> >>Thank you for the patch. Two remarks if you want that I merge it:
> >>
> >>1) use open/read/write/close instead of fopen/fread/fwrite/fclose for 
> >>consistency with other block drivers.
> > 
> > 
> > The reason I used stdio is that read/write are non-blocking. It is
> > not an error for read to return fewer bytes than requested. If that
> > happens, the other block drivers fail.
> I agree, but for disk accesses it is usual to assume they return the 
> requested amount of bytes. fread/fwrite are buffered I/Os which is a bit 
> overkill for block drivers.

I don't think that buffered I/O is an issue here. We are doing
fread/fwrite of multiples of 512 byte blocks and most implementations
don't actually buffer these.

I am reluctant to just use read/write (as the other block drivers
do) because it is simply wrong. It may work for local files under
Linux, but what about remote files (such as files on NFS mounts)
and other host operating systems?

At the very least we should write small wrapper functions for
read and write that fail only if there was an error.

> >>2) change the license to BSD
> > 
> > I was under the impression that we used GPL. At least that's what
> > COPYING says.
> The different parts of QEMU have different licenses (and of course it 
> affects the license of the resulting program). As mentionned on the web 
> page:
> - The QEMU virtual CPU core library is released under the GNU Lesser 
> General Public License.
> - The Linux QEMU emulator is released under the GNU General Public License.
> - The QEMU PC system emulator is released under the MIT/BSD License.
> The block layer belongs to the QEMU PC system emulator, so its license 
> is BSD.

Alright, I'll change that.


reply via email to

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