From nobody Wed May 14 10:34:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524669693596360.0301884182436; Wed, 25 Apr 2018 08:21:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 229B430014A5; Wed, 25 Apr 2018 15:21:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DA9306B8D1; Wed, 25 Apr 2018 15:21:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9DF4A4CAA5; Wed, 25 Apr 2018 15:21:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3PFFxDS020129 for ; Wed, 25 Apr 2018 11:16:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id B10C0202342F; Wed, 25 Apr 2018 15:15:59 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19A272023430; Wed, 25 Apr 2018 15:15:58 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 25 Apr 2018 17:15:15 +0200 Message-Id: <85540de54501b81f275ff406cece47383927f367.1524668969.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Kevin Wolf , Peter Krempa Subject: [libvirt] [PATCH 07/35] utils: storage: Mark that a virStorageSource is going to be used as a floppy X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 25 Apr 2018 15:21:32 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a flag denoting that a virStorageSource is going to be used as a floppy image. This will be useful in cases where the user passes in files which shall be exposed as an image to the guest. Signed-off-by: Peter Krempa Reviewed-by: John Ferlan --- src/qemu/qemu_domain.c | 3 +++ src/util/virstoragefile.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 109f4f7f36..f8254bfdd5 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -11862,6 +11862,9 @@ qemuDomainPrepareDiskSourceChain(virDomainDiskDefPt= r disk, n->iomode =3D disk->iomode; n->cachemode =3D disk->cachemode; n->discard =3D disk->discard; + + if (disk->device =3D=3D VIR_DOMAIN_DISK_DEVICE_FLOPPY) + n->floppyimg =3D true; } return 0; diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index b450da55ae..57d39f98c2 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -313,6 +313,9 @@ struct _virStorageSource { int cachemode; /* enum virDomainDiskCache */ int discard; /* enum virDomainDiskDiscard */ int detect_zeroes; /* enum virDomainDiskDetectZeroes */ + + bool floppyimg; /* set to true if the storage source is going to be us= ed + as a source for floppy drive */ }; --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list