Hi Thomas,

Am 02.06.2010 um 20:25 schrieb Thomas Schmitt:
> Dagobert Michelsen wrote:
>> I wrote an (unfinished) cd access library a long time ago and used
>>   error = di_walk_minor( rootnode, DDI_NT_CD_CHAN, 0, &result, 
>> &devtToNodepathCallback );
>> to find cd/dvd drives. di_walk_minor is a function from libdevinfo(3lib)
>> where di_walk_minor(3devinfo) is used to select all nodes with a minor
>> device nodetype of DDI_NT_CD_CHAN which happens to be exactly the
>> wanted devices.
> 
> The man page of libdevinfo on my system looks
> indeed very promising.
> 
>  ldd /usr/bin/cdrecord.bin
> shows that it rather uses libvolmgt which by its
> function
>   media_findname()
> probably could be used to enumerate "cdrom0"
> ... "cdromN" for getting their device paths.
> This function is declared obsolete in its man
> page. (One shall use HAL. (shudder))

You may also want to look at the sourcecode of "cdrw", whcich can list
cd recorders with "cdrw -l":
  http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/cdrw/


Best regards

  -- Dago


Reply via email to