From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdD2J-00059B-KT for qemu-devel@nongnu.org; Mon, 08 May 2006 17:12:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdD2H-00058v-7l for qemu-devel@nongnu.org; Mon, 08 May 2006 17:12:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdD2G-00058s-Uu for qemu-devel@nongnu.org; Mon, 08 May 2006 17:12:57 -0400 Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FdD3B-0001ky-0I for qemu-devel@nongnu.org; Mon, 08 May 2006 17:13:53 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FdD26-0004Un-7y for qemu-devel@nongnu.org; Mon, 08 May 2006 23:12:46 +0200 Received: from cpe-70-116-9-243.austin.res.rr.com ([70.116.9.243]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 May 2006 23:12:46 +0200 Received: from anthony by cpe-70-116-9-243.austin.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 May 2006 23:12:46 +0200 From: Anthony Liguori Date: Mon, 08 May 2006 16:12:33 -0500 Message-ID: References: <1147082690.5817.23.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: news Subject: [Qemu-devel] Re: qemu disk on vfat Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sun, 07 May 2006 08:13:01 +0000, Yann Le Doaré wrote: > Hi, > > It seems like qemu 0.8.0 does not accept image file from a vfat partition. > Is it a bug ? > > Greetings. > > Yann Le Doaré. > > > strace : > > open("/mnt/partitions/windows0/qmeu-disk", O_RDONLY|O_LARGEFILE) = 7 > read(7, "", 1024) = 0 close(7) > = 0 open("/mnt/partitions/windows0/qmeu-disk", > O_RDONLY|O_LARGEFILE) = 7 _llseek(7, 128, [128], SEEK_SET) = 0 > read(7, "", 4) = 0 close(7) > = 0 write(2, "qemu: could not open hard disk i"..., 74qemu: could > not open hard disk image '/mnt/partitions/windows0/qmeu-disk' ) = 74 > exit_group(1) = ? It's pretty clear that what's happening is that qemu opening the file and the filesystem is claiming it's an empty file. So, I recommend you do the following: First: du -sh /mnt/partitions/windows0/qmeu-disk ls -al /mnt/partitions/windows0/qmeu-disk And make sure both report a non-zero result. If either reports 0 as the size, then you screwed up copying the file to your vfat partition. Second: In vl.h, change: #ifndef O_LARGEFILE #define O_LARGEFILE 0 #endif To: #ifdef O_LARGEFILE #undef O_LARGEFILE #endif #define O_LARGEFILE 0 And if that fixes your problem, then vfat is broken when open()'d with O_LARGEFILE. If that's the case, you should report it as a vfat bug. Regards, Anthony Liguori