hal and disc type

David Zeuthen david at fubar.dk
Thu May 6 02:32:08 PDT 2004


Hi,

I just committed a change yesterday with a number of changes to properties
related to handling of storage devices - mostly cleanups and sane renaming
of property keys. 

I did add some code (snitched from dvd+rw-tools, GPL stuff) to test for
dvd discs and report back the correct type; this was done using some of 
the code Bastien added so I've copied him as well :-)

So now volume.disc_type (this used to be called storage.cdrom.media_type)
can assume the following values:

 - audio
 - mixed
 - data
 - blank
 - unknown
 - dvd_rom
 - dvd_r
 - dvd_ram
 - dvd_rw_restricted_overwrite
 - dvd_rw
 - dvd_plus_rw
 - dvd_plus_r

Note that this corresponds to the type of the *disc* not the type of the
drive (for optical drives storage.drive_type==cdrom and the booleans 
storage.cdrom.[cdr, cdrw, ..] are set accordingly). 

As I don't have any DVD writers nor media I'm not able to set this, so if
anyone has the opportunity to provide some feedback it would be great.
(in fact I'm not even sure what the dvd_rw_restricted_overwrite means, as
I said I just snitched the code from dvd+rw-tools..)

Now, I'm still not completely happy about this setup, I mean what value
will volume.disc_type asssume for a cdrw disc? Or a non-closed cdr disc?
I mean, desktop environments probably wants to aplly different policies
(and select different icons) for a CD-R disc that is closed versus open.

How about splitting volume.disc_type into the following properties

 volume.disc_type = audio|cd_rom|cd_r|cd_rw|dvd_rom|dvd_r|dvd_ram|dvd_rw|
                    dvd_plus|rdvd_plus_rw

 volume.disc_is_mixed = TRUE|FALSE   ; TRUE iff there is also audio tracks 
                                       on the disc

 volume.disc_is_closed = TRUE|FALSE  ; TRUE iff no (further) writing can
                                       be done

 volume.disc_capacity = <int64>

Looks sane?

Again, I know little about optical discs and drives so please advise. I'm
just trying to anticipate what a desktop environment will like to use..

Thanks and Cheers,
David

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list