• Martin Pitt's avatar
    Fix cdrom speed detection if /proc/sys/dev/cdrom/info references a symlink · 4355f641
    Martin Pitt authored
    As reported in https://launchpad.net/bugs/264071, eject -X does not
    properly resolve symlinks:
    $ eject -Xv
    eject: using default device `cdrom'
    eject: device name is `cdrom'
    eject: expanded name is `/dev/cdrom'
    eject: `/dev/cdrom' is a link to `/dev/scd0'
    eject: `/dev/scd0' is not mounted
    eject: `/dev/scd0' is not a mount point
    eject: listing CD-ROM speed
    eject: error while finding CD-ROM name
    It appears to be complaining because /proc/sys/dev/cdrom/info references 'sr0'
    rather than 'scd0'. /dev/sr0 is just another symlink to /dev/scd0.
    Attached patch (by Adam Buchbinder) fixes this by resolving symbolic