qcow2 spec: Describe string header extensions
authorKevin Wolf <kwolf@redhat.com>
Thu, 7 Mar 2019 16:49:55 +0000 (17:49 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 8 Mar 2019 11:26:46 +0000 (12:26 +0100)
Be more specific about the string representation in header extensions.

Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
docs/interop/qcow2.txt

index bfb97cfde39cfdad77077da8826ab72d59957a6a..8c3098d8d9ce040c2a46278bd9a5e4e704126ee3 100644 (file)
@@ -170,11 +170,11 @@ be stored. Each extension has a structure like the following:
 
     Byte  0 -  3:   Header extension type:
                         0x00000000 - End of the header extension area
-                        0xE2792ACA - Backing file format name
+                        0xE2792ACA - Backing file format name string
                         0x6803f857 - Feature name table
                         0x23852875 - Bitmaps extension
                         0x0537be77 - Full disk encryption header pointer
-                        0x44415441 - External data file name
+                        0x44415441 - External data file name string
                         other      - Unknown header extension, can be safely
                                      ignored
 
@@ -196,6 +196,16 @@ data of compatible features that it doesn't support. Compatible features that
 need space for additional data can use a header extension.
 
 
+== String header extensions ==
+
+Some header extensions (such as the backing file format name and the external
+data file name) are just a single string. In this case, the header extension
+length is the string length and the string is not '\0' terminated. (The header
+extension padding can make it look like a string is '\0' terminated, but
+neither is padding always necessary nor is there a guarantee that zero bytes
+are used for padding.)
+
+
 == Feature name table ==
 
 The feature name table is an optional header extension that contains the name