summaryrefslogtreecommitdiffstats
path: root/urpm/util.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/util.pm')
-rw-r--r--urpm/util.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/urpm/util.pm b/urpm/util.pm
index c786227b..4dbad1cc 100644
--- a/urpm/util.pm
+++ b/urpm/util.pm
@@ -30,6 +30,7 @@ our @EXPORT = qw(add2hash_
reduce_pathname
remove_internal_name
same_size_and_mtime
+ uefi_type
uniq
uniq_
unquotespace
@@ -215,6 +216,16 @@ sub append_to_file {
1;
}
+#- return the UEFI machine type short name
+sub uefi_type() {
+ if (-e '/sys/firmware/efi/fw_platform_size') {
+ # No support for ARM yet
+ cat_('/sys/firmware/efi/fw_platform_size') =~ /32/ ? 'ia32' : 'x64';
+ } else {
+ 'none';
+ }
+}
+
1;