From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRGZU-0000kH-5I for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:32:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRGZO-0005xT-KM for qemu-devel@nongnu.org; Fri, 08 Jun 2018 08:32:48 -0400 From: Ari Sundholm Date: Fri, 8 Jun 2018 15:32:26 +0300 Message-ID: <1528461148-17925-9-git-send-email-ari@tuxera.com> In-Reply-To: <1528461148-17925-1-git-send-email-ari@tuxera.com> References: <1528461148-17925-1-git-send-email-ari@tuxera.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v4 08/10] hw/block/fdc: Always apply block configuration to block driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Ari Sundholm , John Snow , Kevin Wolf , Max Reitz , "open list:Floppy" This allows the block driver to use the block configuration of the new floppy device. One use for this information is to set request limits using this information. Signed-off-by: Ari Sundholm --- hw/block/fdc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index cd29e27..b11eeda 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -482,6 +482,8 @@ static void fd_change_cb(void *opaque, bool load, Error **errp) errp)) { return; } + + blkconf_apply_to_blkdrv(drive->conf); } drive->media_changed = 1; @@ -594,6 +596,8 @@ static void floppy_drive_realize(DeviceState *qdev, Error **errp) pick_drive_type(drive); dev->type = drive->drive; + blkconf_apply_to_blkdrv(&dev->conf); + fd_revalidate(drive); } -- 2.7.4