Add an is_native_arch($arch) subroutine to compare a CPU architecture to the host CPU architecture. This is brought in from PVE::QemuServer.
Signed-off-by: Filip Schauer <f.scha...@proxmox.com> --- src/PVE/Tools.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index 766c809..234f16a 100644 --- a/src/PVE/Tools.pm +++ b/src/PVE/Tools.pm @@ -52,6 +52,7 @@ extract_param extract_sensitive_params file_copy get_host_arch +is_native_arch O_PATH O_TMPFILE AT_EMPTY_PATH @@ -1841,6 +1842,11 @@ sub get_host_arch { return $host_arch; } +sub is_native_arch($) { + my ($arch) = @_; + return get_host_arch() eq $arch; +} + # Devices are: [ (12 bits minor) (12 bits major) (8 bits minor) ] sub dev_t_major($) { my ($dev_t) = @_; -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel