[Top][All Lists]

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

Re: [Qemu-devel] Re: qemu port

From: Juergen Lock
Subject: Re: [Qemu-devel] Re: qemu port
Date: Fri, 4 Jun 2004 20:44:06 +0200

On Thu, Jun 03, 2004 at 12:21:27AM +0000, Bartosz Fabianowski wrote:
> > OK, I've now taken this and the other FreeBSD patches, added a few 
> > small ones of my own and made a port [...]
> Awesome! A port was my original idea and the reason for why I started
> tinkering with QEMU in the first place.
> > - needs to run as root in order to use /dev/tap* networking (why?)
> I haven't looked at your port yet, but my own compilation of QEMU has
> the same problem.  ...

Problem solved: its a redundant(?) uid check in the if_tap module
(btw at least on 4.9 i have to cycle thru the available /dev/tap[0123]
device nodes myself, see patch-bt)

> > - using physical media doesn't work on 4.x hosts (missing
> This is the place where it's actually used:
> if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size))
>      size = lseek(fd, 0LL, SEEK_END);
> This ioctl checks whether the total size of the medium can be retrieved
> and thus only succeeds if there is a medium in the drive. So the ioctl
> effectively just checks whether there is a medium. The size is then
> retrieved separately using lseek.

 Heh. :)  No.  ioctl() returns 0 on success not on failure, so
only if the ioctl fails is the size retrieved via lseek (and this
lseek method doesnt work on pyhsical devices, therefore the ioctl.)


reply via email to

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