[mythtv] FAT 32 and volume label

Xavier Hervy maxpower44 at tiscali.fr
Thu Jul 15 11:38:41 EDT 2004


I Actually work around removable drive (firewire / usb via scsi) for 
media monitor.

I try to get the volume label of a partition in FAT 32.
I find information about fat here : 
http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html
Unfortunaly, when i read in offset 71, I get a "NO NAME" label.
But when i'm under windows, I can see the real label.
What i'm doing wrong ?
If the label shown on windows is not the label on fat 32 (71-81) where i 
can find it ?
Some help will be appreciate.

Xavier

PS : here is what i doing :
int drive =  open("/dev/sda1", O_RDWR);
if (drive > 0)
{
    lseek(drive,71,SEEK_SET);
    char label[10];
    read(drive, &label,10);
    close (drive);
    cout << "label " << label << endl;
}



More information about the mythtv-dev mailing list