On Fri, Nov 15, 2019 at 04:51:50PM +0100, Peter Krempa wrote: > As a first step we will build the blockdevs which will be supposed to > back the pflash drives when moving away from -drive. > > This code is similar to the way we build the blockdevs for the disk, but > skips the copy-on-read layer and doesn't implement any legacy approach. > > Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> > --- > src/qemu/qemu_command.c | 46 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 46 insertions(+) > +static int > +qemuBuildPflashBlockdevCommandLine(virCommandPtr cmd, > + qemuDomainObjPrivatePtr priv) > +{ > + if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) > + return 0; > + > + if (priv->pflash0) { > + if (qemuBuildPflashBlockdevOne(cmd, priv->pflash0, priv->qemuCaps) < 0) > + return -1; > + } > + > + if (priv->pflash1) { > + if (qemuBuildPflashBlockdevOne(cmd, priv->pflash1, priv->qemuCaps) < 0) > + return -1; > + } These could have been done as single if()s but that's nitpicking & I don't strongly care, so regardless of whether you change it or not Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list