1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00

Fix mcopy error messages

This commit is contained in:
Bernhard Ehlers 2020-11-05 15:00:44 +01:00
parent de2b9caeeb
commit e45bc5aec1

View File

@ -1678,9 +1678,9 @@ class QemuVM(BaseNode):
mbr = img_file.read(512) mbr = img_file.read(512)
part_type, offset, signature = struct.unpack("<450xB3xL52xH", mbr) part_type, offset, signature = struct.unpack("<450xB3xL52xH", mbr)
if signature != 0xAA55: if signature != 0xAA55:
raise OSError("mcopy failure: {}: invalid MBR".format(image)) raise OSError("{}: invalid MBR".format(image))
if part_type not in (1, 4, 6, 11, 12, 14): if part_type not in (1, 4, 6, 11, 12, 14):
raise OSError("mcopy failure: {}: invalid partition type {:02X}" raise OSError("{}: invalid partition type {:02X}"
.format(image, part_type)) .format(image, part_type))
part_image = image + "@@{}S".format(offset) part_image = image + "@@{}S".format(offset)