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:
parent
de2b9caeeb
commit
e45bc5aec1
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user