On Tue, 2002-05-14 at 14:32, CJ Kucera wrote:
> On Tue, May 14, 2002 at 01:33:26PM -0400, Ed Sweetman wrote:
> > It's actually not standard to mount things inside /mnt   but rather /mnt
> > be a mount point of some device.  
> > 
> > You should use /proc/mounts to look for cdrom fs's and query their
> > mountpoints.   I think that would be better than hardcoding paths.  
> 
> Hm.  I know that RedHat at least uses /mnt/cdrom by default (also
> /mnt/floppy for the floppy drives, etc), and I believe Mandrake does,
> too.
Well, standards are made by the majority, even if they are wrong. so
whatever.

 
> Regardless, checking out /proc/mounts is a pretty good idea.  Should
> it just scan for anything with an "iso9660" filesystem type?
> Theoretically, you could run into problems with people mounting
> ISOs on their system, but I suppose that's somewhat more rare.

mounted fs's that aren't devices have to be mounted via loop, so you
could just look for those fs's that could be cdroms and not on the
loopback interface. 

> Or would it make sense to actually use getmntent(3) to look for
> an iso9660 fs in /etc/fstab?  That way you could be fairly
> certain you're getting the "system" CDrom as opposed to just some
> random ISO mounted loopback . . .

fstab doesn't necessarily have to list a device for it to be mounted,
that's why i think /proc/mounts is better since it actually lists what
is mounted.   

> Let me know what you think and I'll submit a new patch.


Of course, you can go with the most obvious solution,  make the cdrom
device(s) a option that the user enters in the preference window and be
done with it.  (perhaps delimited by comma)   easy enough.  

_______________________________________________
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev

Reply via email to