mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
inspect: windows: Fail hard if we cannot detect Windows architecture (RHBZ#1278371).
The user did not have the 'file' command installed, and when they attempted to do a v2v conversion of a Windows guest, inspection succeeded, but the Types.i_arch field was found to contain "unknown". virt-v2v conversion failed to locate the correct virtio drivers as a result. The 'file' command is required, and there's no other reason we should not be able to detect the architecture of any Windows guest, so fail hard in this situation.
This commit is contained in:
@@ -238,9 +238,10 @@ check_windows_arch (guestfs_h *g, struct inspect_fs *fs)
|
||||
return -1;
|
||||
|
||||
char *arch = guestfs_file_architecture (g, cmd_exe_path);
|
||||
if (!arch)
|
||||
return -1;
|
||||
|
||||
if (arch)
|
||||
fs->arch = arch; /* freed by guestfs_int_free_inspect_info */
|
||||
fs->arch = arch; /* freed by guestfs_int_free_inspect_info */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user