diff options
author | Erik Troan <ewt@redhat.com> | 2000-05-12 23:30:43 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-05-12 23:30:43 +0000 |
commit | eb2c1be6ac53a4f07a47da48052625fe14e78141 (patch) | |
tree | 0098af981111dd1f2d2d77cfe9d5dd1823fa5b58 /isys/isys.py | |
parent | ca9772836cfe7fa5804431519fba84d676ef49c7 (diff) | |
download | anaconda-eb2c1be6ac53a4f07a47da48052625fe14e78141.tar.gz anaconda-eb2c1be6ac53a4f07a47da48052625fe14e78141.tar.xz anaconda-eb2c1be6ac53a4f07a47da48052625fe14e78141.zip |
added cdrom eject stuff
Diffstat (limited to 'isys/isys.py')
-rw-r--r-- | isys/isys.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/isys/isys.py b/isys/isys.py index 2cd417cdd..94dbddd0d 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -263,19 +263,23 @@ def ext2IsDirty(device): os.unlink("/tmp/disk") return label +def ejectCdrom(device): + makeDevInode(device, "/tmp/cdrom") + fd = os.open("/tmp/cdrom", os.O_RDONLY) + _isys.ejectcdrom(fd) + os.close(fd) + os.unlink("/tmp/cdrom") + def driveIsRemovable(device): # assume ide if starts with 'hd', and we don't have to create # device beforehand since it just reads /proc/ide from log import log if device[:2] == "hd": -# log("testing IDE device %s", device) rc = (_isys.isIdeRemovable("/dev/"+device) == 1) else: -# log("testing SCSI device %s", device) makeDevInode(device, "/tmp/disk") rc = (_isys.isScsiRemovable("/tmp/disk") == 1) os.unlink("/tmp/disk") -# log("test result was %d", rc) return rc |