hal/hald/linux/volume_id volume_id.c, 1.33, 1.34 volume_id.h, 1.18, 1.19

Kay Sievers kay at freedesktop.org
Wed Sep 15 13:57:21 PDT 2004


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

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

        * hald/linux/volume_id/volume_id.c: (probe_hfs_hfsplus):
        Copy over extents array for later examination. Fixes the
        label reading of a 40 GB hfsplus volume that I found on
        my neighbours desk.



Index: volume_id.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/volume_id/volume_id.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- volume_id.c	14 Sep 2004 19:25:57 -0000	1.33
+++ volume_id.c	15 Sep 2004 20:57:19 -0000	1.34
@@ -1621,6 +1621,7 @@
 	struct hfsplus_bheader_record *bnode;
 	struct hfsplus_catalog_key *key;
 	unsigned int	label_len;
+	struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT];
 	const __u8 *buf;
 
 	buf = get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200);
@@ -1679,7 +1680,8 @@
 	blocksize = be32_to_cpu(hfsplus->blocksize);
 	dbg("blocksize %u", blocksize);
 
-	cat_block = be32_to_cpu(hfsplus->cat_file.extents[0].start_block);
+	memcpy(extents, hfsplus->cat_file.extents, sizeof(extents));
+	cat_block = be32_to_cpu(extents[0].start_block);
 	dbg("catalog start block 0x%x", cat_block);
 
 	buf = get_buffer(id, off + (cat_block * blocksize), 0x2000);
@@ -1704,8 +1706,8 @@
 
 	/* get physical location */
 	for (ext = 0; ext < HFSPLUS_EXTENT_COUNT; ext++) {
-		ext_block_start = be32_to_cpu(hfsplus->cat_file.extents[ext].start_block);
-		ext_block_count = be32_to_cpu(hfsplus->cat_file.extents[ext].block_count);
+		ext_block_start = be32_to_cpu(extents[ext].start_block);
+		ext_block_count = be32_to_cpu(extents[ext].block_count);
 		dbg("extent start block 0x%x, count 0x%x", ext_block_start, ext_block_count);
 
 		if (ext_block_count == 0)

Index: volume_id.h
===================================================================
RCS file: /cvs/hal/hal/hald/linux/volume_id/volume_id.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- volume_id.h	13 Sep 2004 15:11:42 -0000	1.18
+++ volume_id.h	15 Sep 2004 20:57:19 -0000	1.19
@@ -21,7 +21,7 @@
 #ifndef _VOLUME_ID_H_
 #define _VOLUME_ID_H_
 
-#define VOLUME_ID_VERSION		023
+#define VOLUME_ID_VERSION		024
 
 #define VOLUME_ID_LABEL_SIZE		64
 #define VOLUME_ID_UUID_SIZE		16




More information about the hal-commit mailing list