hal/hald/linux/volume_id volume_id.c,1.29,1.30

Kay Sievers kay at freedesktop.org
Sun Sep 12 02:49:31 PDT 2004


Update of /cvs/hal/hal/hald/linux/volume_id
In directory gabe:/tmp/cvs-serv8199/hald/linux/volume_id

Modified Files:
	volume_id.c 
Log Message:
2004-09-12  Kay Sievers  <kay.sievers at vrfy.org>

        * hald/linux/volume_id/volume_id.c: (probe_vfat): Patch from
          Sjoerd Simons <sjoerd at luon.net> to fix vfat label reading
          on big endian systems



Index: volume_id.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/volume_id/volume_id.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- volume_id.c	30 Aug 2004 15:13:17 -0000	1.29
+++ volume_id.c	12 Sep 2004 09:49:28 -0000	1.30
@@ -885,7 +885,7 @@
 
 	sect_count = le16_to_cpu(vs->sectors);
 	if (sect_count == 0)
-		sect_count = vs->total_sect;
+		sect_count = le32_to_cpu(vs->total_sect);
 	dbg("sect_count 0x%x", sect_count);
 
 	fat_length = le16_to_cpu(vs->fat_length);
@@ -947,7 +947,7 @@
 		__u64 fat_entry_off;
 
 		dbg("next cluster %u", next);
-		next_sect_off = (next - 2) * vs->sectors_per_cluster;
+		next_sect_off = (next - 2) * le16_to_cpu(vs->sectors_per_cluster);
 		next_off = (start_data_sect + next_sect_off) * sector_size;
 		dbg("cluster offset 0x%x", next_off);
 




More information about the hal-commit mailing list