On Wed, Feb 19, 2020 at 09:18:40 -0600, Eric Blake wrote: > On 2/17/20 11:13 AM, Peter Krempa wrote: > > Probing by file suffix was meant to be a last resort if probing by > > contents fails or is not supported. For most formats we never specified > > any suffix. There's a few formats implementing both magic bytes and > > suffix and finally DMG which had only suffix probing. Since suffix > > probing is nowhere reliable and only one format depends on in whic has a > > which > > > comment that qemu doesn't do the probing either drop the whole > > infrastructure. > > > > Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> > > --- > > src/util/virstoragefile.c | 58 ++++++++++++--------------------------- > > 1 file changed, 17 insertions(+), 41 deletions(-) > > > > > @@ -324,50 +322,50 @@ static struct FileTypeInfo const fileTypeInfo[] = { > > /* XXX QEMU says there's no magic for dmg, > > * /usr/share/misc/magic lists double magic (both offsets > > * would have to match) but then disables that check. */ > > - 0, NULL, ".dmg", > > + 0, NULL, > > 0, -1, 0, {0}, > > -1, 0, 0, NULL, NULL, NULL > > }, > > Is it even worth keeping the dmg entry around? But deleting it (if > appropriate) should be separate from this patch. The internals currently expect that we have an entry for every image type supported in libvirt, so we need the dummy entry anyways. > > Reviewed-by: Eric Blake <eblake@xxxxxxxxxx> > > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3226 > Virtualization: qemu.org | libvirt.org