Change VMDK hwversion to unsigned integer.

This commit is contained in:
2018-01-17 19:22:00 +00:00
parent 87c0f628eb
commit ee0522be81

View File

@@ -111,7 +111,7 @@ namespace DiscImageChef.DiscImages
ulong grainSize; ulong grainSize;
uint[] gTable; uint[] gTable;
bool hasParent; bool hasParent;
int hwversion; uint hwversion;
ImageInfo imageInfo; ImageInfo imageInfo;
string imageType; string imageType;
uint maxCachedGrains; uint maxCachedGrains;
@@ -867,7 +867,7 @@ namespace DiscImageChef.DiscImages
{ {
("adapter_type", typeof(string), ("adapter_type", typeof(string),
"Type of adapter type. Possible values: ide, lsilogic, buslogic, legacyESX."), "Type of adapter type. Possible values: ide, lsilogic, buslogic, legacyESX."),
("hwversion", typeof(int), "VDMK hardware version."), ("sparse", typeof(bool), "Use sparse extents."), ("hwversion", typeof(uint), "VDMK hardware version."), ("sparse", typeof(bool), "Use sparse extents."),
("split", typeof(bool), "Split data file at 2GiB.") ("split", typeof(bool), "Split data file at 2GiB.")
}; };
public IEnumerable<string> KnownExtensions => new[] {".vmdk"}; public IEnumerable<string> KnownExtensions => new[] {".vmdk"};
@@ -898,7 +898,7 @@ namespace DiscImageChef.DiscImages
if(options.TryGetValue("hwversion", out string tmpValue)) if(options.TryGetValue("hwversion", out string tmpValue))
{ {
if(!int.TryParse(tmpValue, out hwversion)) if(!uint.TryParse(tmpValue, out hwversion))
{ {
ErrorMessage = "Invalid value for hwversion option"; ErrorMessage = "Invalid value for hwversion option";
return false; return false;