summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-03 17:54:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-03 17:54:09 +0000
commit54b386221bf8fac4ae3dbbbeb7e588f263a2394f (patch)
tree27c076b5c98fa196284f2873808c714debe3c63f /perl-install
parentd6c35b6506b91c6ab24c4c0001f99d4addd0b245 (diff)
downloaddrakx-backup-do-not-use-54b386221bf8fac4ae3dbbbeb7e588f263a2394f.tar
drakx-backup-do-not-use-54b386221bf8fac4ae3dbbbeb7e588f263a2394f.tar.gz
drakx-backup-do-not-use-54b386221bf8fac4ae3dbbbeb7e588f263a2394f.tar.bz2
drakx-backup-do-not-use-54b386221bf8fac4ae3dbbbeb7e588f263a2394f.tar.xz
drakx-backup-do-not-use-54b386221bf8fac4ae3dbbbeb7e588f263a2394f.zip
do not eject cdrom when already removed at the end of install (bug #1235)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/c/stuff.xs.pl2
-rw-r--r--perl-install/install_any.pm5
2 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl
index aa9fda760..8111f2eba 100644
--- a/perl-install/c/stuff.xs.pl
+++ b/perl-install/c/stuff.xs.pl
@@ -591,7 +591,7 @@ rpmvercmp(char *a, char *b);
[ qw(int S_IFCHR S_IFBLK S_IFIFO KDSKBENT KT_SPEC NR_KEYS MAX_NR_KEYMAPS BLKRRPART TIOCSCTTY
HDIO_GETGEO BLKGETSIZE LOOP_GET_STATUS
MS_MGC_VAL MS_RDONLY O_NONBLOCK F_SETFL F_GETFL O_CREAT SECTORSIZE WNOHANG
- VT_ACTIVATE VT_WAITACTIVE VT_GETSTATE CDROM_LOCKDOOR CDROMEJECT
+ VT_ACTIVATE VT_WAITACTIVE VT_GETSTATE CDROM_LOCKDOOR CDROMEJECT CDROM_DRIVE_STATUS CDS_DISC_OK
LOG_WARNING LOG_INFO LOG_LOCAL1
) ],
);
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index f35dc8a06..2ba152c82 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -546,7 +546,10 @@ sub ejectCdrom(;$) {
#- D state if the cdrom is already removed
eval { fs::umount("/tmp/image") };
if ($@) { log::l("files still open: ", readlink($_)) foreach map { glob_("$_/fd/*") } glob_("/proc/*") }
- eval { ioctl detect_devices::tryOpen($cdrom), c::CDROMEJECT(), 1 };
+ eval {
+ my $dev = detect_devices::tryOpen($cdrom);
+ ioctl($dev, c::CDROMEJECT(), 1) if ioctl($dev, c::CDROM_DRIVE_STATUS(), 0) == c::CDS_DISC_OK();
+ };
}
}