From 8dbbf84c2aeb28b4078e22aac786b204a15920b9 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Wed, 26 Sep 2007 20:08:08 +0000 Subject: [PATCH] qemu stuff --- magic/Magdir/msdos | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/magic/Magdir/msdos b/magic/Magdir/msdos index 4ae4bc7a..9b565818 100644 --- a/magic/Magdir/msdos +++ b/magic/Magdir/msdos @@ -608,10 +608,46 @@ 0 string VMDK VMware4 disk image 0 string KDMV VMware4 disk image -0 belong 0x514649fb QEMU Copy-On-Write disk image ->4 belong x version %d, ->24 belong x size %d + ->28 belong x %d +#-------------------------------------------------------------------- +# Qemu Emulator Images +# Lines written by Friedrich Schwittay (f.schwittay@yousable.de) +# Made by reading sources and doing trial and error on existing +# qcow files +0 string QFI Qemu Image, Format: Qcow + +# Uncomment the following line to display Magic (only used for +debugging +# this magic number) +#>0 string x , Magic: %s + +# There are currently 2 Versions: "1" and "2" +# I do not use Version 2 and therefor branch here +# but can assure: it works (tested on both versions) +# Also my Qemu 0.9.0 which uses this Version 2 refuses +# to start in its bios +>0x04 belong 2 , Version: 2 +>0x04 belong 1 , Version: 1 + +# Using the existence of the Backing File Offset to Branch or not +# to read Backing File Information +>>0xc belong >0 , Backing File( Offset: %d +>>>(0xc.L) string >\0 , Path: %s + +# Didnt got the Trick here how qemu stores the "Size" at this +Position +# There is actually something stored but nothing makes sense +# The header in the sources talks about it +#>>>16 lelong x , Size: %d + +# Modification time of the Backing File +# Really usefull if you want to know if your backing +# file is still usable together with this image +>>>20 bedate x , Mtime: %s ) + +# Dont know how to calculate in Magicfiles +# Also: this Information is not reliably +# stored in image-files +>>24 lelong x , Disk Size could be: %d * 256 bytes 0 string QEVM QEMU's suspend to disk image -- 2.40.0