Le mar 16/12/2003 à 14:54, Erwan Velu a écrit : > In some case, CDROM/DVD devices are /dev/hdc so freevo didn't detect it. > I've made a small patch to use /proc/ide/<device>/media to know if it's > a cdrom or not. > If its the case, the device is added as a cdrom drive :o) Some of my friends reported that if the /proc entry didn't exist (i.e hdd1) freevo crashed.. I've forgot to test the existence of this proc entry :(
+ if os.path.exists('/proc/ide/'+ re.sub(r'^(/dev/)', '', devname) +'/media'): Here come the newest patch :) -- Erwan Velu Linux Cluster Distribution Project Manager MandrakeSoft 43 rue d'aboukir 75002 Paris Phone Number : +33 (0) 1 40 41 17 94 Fax Number : +33 (0) 1 40 41 92 00 Web site : http://www.mandrakesoft.com OpenPGP key : http://www.mandrakesecure.net/cks/
--- src/config.py.old 2003-12-16 14:50:40.000000000 +0100 +++ src/config.py 2003-12-16 14:51:04.000000000 +0100 @@ -614,6 +614,15 @@ dispname = 'CD-%s' % (len(ROM_DRIVES)+1) elif devname.lower().find('dvd') != -1: dispname = 'DVD-%s' % (len(ROM_DRIVES)+1) + elif devname.lower().find('hd') != -1: + print 'Trying to autodetect type of %s' %devname + if os.path.exists('/proc/ide/'+ re.sub(r'^(/dev/)', '', devname) +'/media'): + if open('/proc/ide/'+ re.sub(r'^(/dev/)', '', devname) +'/media','r').read().lower().find('cdrom') !=1: + dispname = 'CD-%s' % (len(ROM_DRIVES)+1) + print ("%s is a cdrom drive" %devname) + else: + print ("%s doesn't seems to be a cdrom drive" %devname) + mntdir = devname = dispname = '' else: mntdir = devname = dispname = ''
signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=