> -----Original Message----- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 04 January 2019 16:31 > To: Paul Durrant <paul.durr...@citrix.com> > Cc: qemu-de...@nongnu.org; qemu-block@nongnu.org; xen- > de...@lists.xenproject.org; Kevin Wolf <kw...@redhat.com>; Max Reitz > <mre...@redhat.com>; Stefano Stabellini <sstabell...@kernel.org> > Subject: Re: [PATCH v7 16/18] xen: automatically create XenBlockDevice-s > > Almost done, there is one thing left which I believe is an issue. > Whenever I attach a raw file to QEMU, it print: > qemu-system-i386: warning: Opening a block device as a file using the > 'file' driver is deprecated
Oh, I'd not noticed that... but then I only use raw files occasionally. > > So, I think the comment below isn't true. We should create a "raw" > driver for "raw" files. > > On Thu, Dec 20, 2018 at 05:14:37PM +0000, Paul Durrant wrote: > > +static XenBlockDrive *xen_block_drive_create(const char *id, > > + const char *device_type, > > + QDict *opts, Error **errp) > > +{ > ... > > > + if (params) { > > + char **v = g_strsplit(params, ":", 2); > > + > > + if (v[1] == NULL) { > > + filename = g_strdup(v[0]); > > + driver = g_strdup("file"); > > + } else { > > + if (strcmp(v[0], "aio") == 0) { > > + driver = g_strdup("file"); > > + } else if (strcmp(v[0], "vhd") == 0) { > > + driver = g_strdup("vpc"); > > + } else { > > + driver = g_strdup(v[0]); > > + } > > + filename = g_strdup(v[1]); > > + } > > + > > + g_strfreev(v); > > + } > > + > ... > > > + /* If the image is a raw file then we are done */ > > raw files should use the "raw" driver, so we aren't done yet. > Ok. Having a strictly 2-layer stack actually makes things simpler anyway :-) Paul > > + if (!strcmp(driver, "file")) { > > + goto done; > > + } > > -- > Anthony PERARD