From patchwork Mon Jan 6 10:58:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiyokazu SUTO X-Patchwork-Id: 307345 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CC1242C00C1 for ; Tue, 7 Jan 2014 01:54:43 +1100 (EST) Received: from localhost ([::1]:35654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0BZh-0007dP-3c for incoming@patchwork.ozlabs.org; Mon, 06 Jan 2014 09:54:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W07tS-0006mX-SQ for qemu-devel@nongnu.org; Mon, 06 Jan 2014 05:58:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W07tN-0003vw-SM for qemu-devel@nongnu.org; Mon, 06 Jan 2014 05:58:50 -0500 Received: from omega.ks-and-ks.ne.jp ([60.32.14.193]:41338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W07tD-0003oY-1y; Mon, 06 Jan 2014 05:58:35 -0500 Received: from omega.ks-and-ks.ne.jp (localhost [127.0.0.1]) by omega.ks-and-ks.ne.jp with esmtp id 1W07t6-0003yo-R0; Mon, 06 Jan 2014 19:58:28 +0900 To: qemu-devel@nongnu.org User-Agent: SEMI/1.12.1 ([JR] Nonoichi) FLIM/1.12.2 (=?ISO-8859-4?Q?Kuj=F2?= ) MULE/2.3 (SUETSUMUHANA) (based on Emacs 19.34) MIME-Version: 1.0 (generated by SEMI 1.12.1 - "[JR] Nonoichi") From: Kiyokazu SUTO Message-ID: <20140106-195827-666c9.suto@ks-and-ks.ne.jp> Date: 06 Jan 2014 19:58:27 +0900 Lines: 34 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 60.32.14.193 X-Mailman-Approved-At: Mon, 06 Jan 2014 09:54:02 -0500 Cc: qemu-trivial@nongnu.org, suto@ks-and-ks.ne.jp Subject: [Qemu-devel] Virtual VFAT with floppy option doesn't work X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hi, Virtual VFAT mechanism in recent releases does not work with the floppy option, because, in `vvfat_open()' function, the member `first_sectors_number' is overwritten with the value for HDD even when the floppy option presents. I attach the diff output just to clarify the problem. Sorry if this has been already fixed in the git repository. Regards, diff -up qemu-1.7.0/block/vvfat.c{-dist,} --- qemu-1.7.0/block/vvfat.c-dist 2013-11-28 07:15:55.000000000 +0900 +++ qemu-1.7.0/block/vvfat.c 2014-01-06 07:03:45.000000000 +0900 @@ -1123,6 +1123,7 @@ DLOG(if (stderr == NULL) { if (!s->fat_type) { s->fat_type = 16; } + s->first_sectors_number=0x40; cyls = s->fat_type == 12 ? 64 : 1024; heads = 16; secs = 63; @@ -1151,7 +1152,6 @@ DLOG(if (stderr == NULL) { s->current_cluster=0xffffffff; - s->first_sectors_number=0x40; /* read only is the default for safety */ bs->read_only = 1; s->qcow = s->write_target = NULL;