[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Magic Numbers for Qemu Images
From: |
Friedrich Schwittay |
Subject: |
[Qemu-devel] Magic Numbers for Qemu Images |
Date: |
Sun, 29 Apr 2007 20:46:11 +0200 |
User-agent: |
Internet Messaging Program (IMP) H3 (4.0.3) |
/* CC´d to address@hidden:
Just to have it available to Qemu-Devs
who will acually have real use for it */
Hi Christos,
i recently added some lines to my magic
file and since there might be a hole bunch
of people out there pointing file(1) on
qemu images it would be nice, if you include
them into available file(1) releases.
I would appreciate if you keep my name in there, thx.
######## And here they are:############
#--------------------------------------------------------------------
# Qemu Emulator Images
# Lines written by Friedrich Schwittay (address@hidden)
# 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
####### End of Qemu-Lines #############
I will make some more if there is Interest in it
For me it just makes it possible to check where i
have to put the corresponding Backing File when the
location has changed because tool "qemu-img info"
refuses to show this information if the backing
file is not in the right position.
Best Wishes
Friedrich Schwittay
pgpZdxwWxVz58.pgp
Description: Digitale PGP-Unterschrift
binTh52W0EZPG.bin
Description: Öffentlicher PGP-Schlüssel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] Magic Numbers for Qemu Images,
Friedrich Schwittay <=