summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-08-19 16:17:51 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-08-19 16:17:51 +0000
commit334e1b3b709e3585f6774b6cb46f2e4c32202c1e (patch)
tree9b5bc92be64b1ca6decf82c1773c5cd8d410e0b5 /perl-install
parentf3f32ba9b06b79b6cb35686c9b1a3fb5377526e3 (diff)
downloaddrakx-backup-do-not-use-334e1b3b709e3585f6774b6cb46f2e4c32202c1e.tar
drakx-backup-do-not-use-334e1b3b709e3585f6774b6cb46f2e4c32202c1e.tar.gz
drakx-backup-do-not-use-334e1b3b709e3585f6774b6cb46f2e4c32202c1e.tar.bz2
drakx-backup-do-not-use-334e1b3b709e3585f6774b6cb46f2e4c32202c1e.tar.xz
drakx-backup-do-not-use-334e1b3b709e3585f6774b6cb46f2e4c32202c1e.zip
Handle EFI partitions. umount syscall does not exist on AMD64, use umount2
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index d78199d5e..717bbc518 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -608,7 +608,7 @@ sub real_format_part {
format_jfs($dev, @options);
} elsif (isDos($part)) {
format_dos($dev, @options);
- } elsif (isWin($part)) {
+ } elsif (isWin($part) || isEfi($part)) {
format_dos($dev, @options, '-F', 32);
} elsif (isThisFs('hfs', $part)) {
format_hfs($dev, @options, '-l', "Untitled");
@@ -760,7 +760,12 @@ sub umount {
my ($mntpoint) = @_;
$mntpoint =~ s|/$||;
log::l("calling umount($mntpoint)");
- syscall_('umount', $mntpoint) or die \N("error unmounting %s: %s", $mntpoint, $!);
+
+ # SYS_umount is not a valid sycall on modern kernels
+ (arch() =~ /x86_64/
+ ? syscall_('umount2', $mntpoint, 0)
+ : syscall_('umount', $mntpoint)
+ ) or die \N("error unmounting %s: %s", $mntpoint, $!);
substInFile { $_ = '' if /(^|\s)$mntpoint\s/ } '/etc/mtab'; #- don't care about error, if we can't read, we won't manage to write... (and mess mtab)
}