github.com/Microsoft/azure-vhd-utils@v0.0.0-20230613175315-7c30a3748a1b/vhdcore/footer/vhdCreatorVersion.go (about) 1 package footer 2 3 import "fmt" 4 5 // VhdCreatorVersion represents the major/minor version of the application that 6 // created the hard disk image. The version is stored in the vhd footer in 7 // big-endian format. 8 // 9 type VhdCreatorVersion uint32 10 11 const ( 12 // VhdCreatorVersionNone represents a nil host Creator version 13 VhdCreatorVersionNone VhdCreatorVersion = 0 14 // VhdCreatorVersionVS2004 represents the value set by Virtual Server 2004 15 VhdCreatorVersionVS2004 VhdCreatorVersion = 0x00010000 16 // VhdCreatorVersionVPC2004 represents the value set by Virtual PC 2004 17 VhdCreatorVersionVPC2004 VhdCreatorVersion = 0x00050000 18 // VhdCreatorVersionCSUP2011 represents a value set by CSUP 2011 19 VhdCreatorVersionCSUP2011 VhdCreatorVersion = 0x00070000 20 ) 21 22 // String returns the string representation of the VhdCreatorVersion. If the int 23 // VhdCreatorVersion value does not match with the predefined CreatorVersions then 24 // this function convert the int to string and return. 25 // 26 func (v VhdCreatorVersion) String() string { 27 switch v { 28 case VhdCreatorVersionVS2004: 29 return "VS2004" 30 case VhdCreatorVersionVPC2004: 31 return "VPC2004" 32 case VhdCreatorVersionCSUP2011: 33 return "SUP2011" 34 } 35 36 return fmt.Sprintf("%d", v) 37 }