Written by Petr Tomasek <tomasek@etf.cuni.cz> Nov 14 1999
Changes by Andreas Mohr <andi@rhlx01.fht-esslingen.de> Jan 25 2000
(Extracted from wine/documentation/cdrom-labels)
Until now, your only possibility of specifying drive volume labels and serial numbers was to set them manually in the wine config file. By now, wine can read them directly from the device as well. This may be useful for many Win 9x games or for setup programs distributed on CD-ROMs that check for volume label.
Reading labels and serial numbers just works automagically if you specify a Device= line in the [Drive X] section in your ~/.wine/config. Note that the device has to exist and must be accessible if you do this, though.
If you don't do that, then you should give fixed "Label" = or "Serial" = entries in ~/.wine/config, as Wine returns these entries instead if no device is given. If they don't exist, then Wine will return default values (label Drive X and serial 12345678).
If you want to give a "Device" = entry only for drive raw sector accesses, but not for reading the volume info from the device (i.e. you want a fixed, preconfigured label), you need to specify "ReadVolInfo" = "0" to tell Wine to skip the volume reading.
Here's a simple example of cdrom and floppy; labels will be read from the device on both cdrom and floppy; serial numbers on floppy only:
[Drive A] "Path" = "/mnt/floppy" "Type" = "floppy" "Device" = "/dev/fd0" "Filesystem" = "msdos" [Drive R] "Path" = "/mnt/cdrom" "Type" = "cdrom" "Device" = "/dev/hda1" "Filesystem" = "win95" |
Here's an example of overriding the CD-ROM label:
[Drive J] "Path" = "/mnt/cdrom" "Type" = "cdrom" "Label" = "X234GCDSE" ; note that the device isn't really needed here as we have a fixed label "Device" = "/dev/cdrom" "Filesystem" = "msdos" |
The cdrom label can be read only if the data track of the disk resides in the first track and the cdrom is iso9660.
Better checking for FAT superblock (it now checks only one byte).
Support for labels/serial nums WRITING.
Can the label be longer than 11 chars? (iso9660 has 32 chars).
What about reading ext2 volume label? ....