12-08-07 06:45 AM
On Dec 7, 3:48 pm, Bender <jnbben...@gmail.com> wrote:
> Simple problem. I want to eject a CD from a drive. After plenty of
> tooling around the only reliable way I could do this is to utilize the
> raw device number (or block device number).
>
> I'm using the Solaris SUNWcdrw package to burn disks so I decided to use
> it to extract the raw device number using 'cdrw -l'. Ex: Parse out
> "/dev/rdsk/c0d0t0s0" and do a /usr/bin/eject on that device.
> The problem is 'cdrw -l' doesn't always give me the raw device number.
> Sometimes it gives me the logical name 'cdrom0'. Fortunately I'm working
> on a closed system so I could parse out the /etc/mnttab file to get the
> block device for the /cdrom mount point but this would never work in a
> real world situation.
>
> Finally my question. How can I always reliably eject a CD from its drive?
If there is more than one CD drive on the system, how will you know
which one to eject?
[ Post a follow-up to this message ]
|