From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVGvJ-0004aO-4G for qemu-devel@nongnu.org; Tue, 19 Jun 2018 09:43:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVGvI-0005eI-DI for qemu-devel@nongnu.org; Tue, 19 Jun 2018 09:43:53 -0400 From: Ari Sundholm Date: Tue, 19 Jun 2018 16:43:39 +0300 Message-ID: <1529415820-7750-8-git-send-email-ari@tuxera.com> In-Reply-To: <1529415820-7750-1-git-send-email-ari@tuxera.com> References: <1529415820-7750-1-git-send-email-ari@tuxera.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v5 7/8] 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