From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: Zhi Hui Li <zhihuili@linux.vnet.ibm.com>
Cc: QEMU-devel <qemu-devel@nongnu.org>, pingfanl@cn.ibm.com
Subject: Re: [Qemu-devel] Virtual FAT disk images error, can somebody help me , thank you !
Date: Thu, 8 Mar 2012 08:30:56 +0000 [thread overview]
Message-ID: <20120308083056.GA13515@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <4F584D95.4050208@linux.vnet.ibm.com>
On Thu, Mar 08, 2012 at 02:11:33PM +0800, Zhi Hui Li wrote:
> when I use the command :
>
> 1: mkdir /my_directory
>
> 2: qemu linux.img -fda fat:floppy:/my_directory
>
> when I write to the floppy(just "mkdir test.dir" in the floppy),
> the error occur:
>
> "FLOPPY ERROR: fdctrl_transfer_handler: writing sector 1"
>
> and nothing is written to the /my_directory.
>
> I don't know why?
Although the error comes from hw/fdc.c code it's probably originates in
block/vvfat.c:vvfat_write(), because fdc.c is calling bdrv_write() and
reports an error if that function fails.
I suggest adding printfs or using gdb. The only two returns that have
no fprintf(stderr, ...) are:
/* Check if we're operating in read-only mode */
if (s->qcow == NULL) {
return -EACCES;
}
and
if (sector_num < s->first_sectors_number)
return -1;
Perhaps one of these is failing?
Stefan
next prev parent reply other threads:[~2012-03-08 9:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-08 6:11 [Qemu-devel] Virtual FAT disk images error, can somebody help me , thank you ! Zhi Hui Li
2012-03-08 8:30 ` Stefan Hajnoczi [this message]
2012-03-08 8:57 ` Mark Wu
2012-03-08 9:42 ` Stefan Hajnoczi
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=20120308083056.GA13515@stefanha-thinkpad.localdomain \
--to=stefanha@linux.vnet.ibm.com \
--cc=pingfanl@cn.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=zhihuili@linux.vnet.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).