hal/hald/linux/volume_id volume_id.c, 1.36, 1.37 volume_id.h, 1.19, 1.20

David Zeuthen david at freedesktop.org
Sun Sep 19 18:25:56 PDT 2004


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

Modified Files:
	volume_id.c volume_id.h 
Log Message:
2004-09-20  David Zeuthen  <david at fubar.dk>

	* doc/spec/hal-spec.xml.in: Add docs for volume.is_partition,
	volume.partition.number and volume.partition.x86_type
	
	* hald/linux/block_class_device.c:
	(set_volume_id_values): Add some more debug
	(detect_media): Set volume.is_partition to FALSE
	(block_class_pre_process): Set the new volume.is_partition,
	volume.partition.number and volume.partition.x86_type properties

	* hald/linux/volume_id/volume_id.c (probe_msdos_part_table): Set
	partition_number and partition_msdosparttable_type
	
	* hald/linux/volume_id/volume_id.h: Add partition_number and
	partition_msdosparttable_type members



Index: volume_id.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/volume_id/volume_id.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- volume_id.c	19 Sep 2004 23:23:46 -0000	1.36
+++ volume_id.c	20 Sep 2004 01:25:54 -0000	1.37
@@ -461,6 +461,9 @@
 
 		p = &id->partitions[i];
 
+		p->partition_number = i + 1;
+		p->partition_msdosparttable_type = part[i].sys_ind;
+
 		if (is_extended(part[i].sys_ind)) {
 			dbg("found extended partition at 0x%llx", poff);
 			p->usage_id = VOLUME_ID_PARTITIONTABLE;
@@ -535,6 +538,11 @@
 				p->off = current + poff;
 				p->len = plen;
 				id->partition_count++;
+
+				p->partition_number = id->partition_count;
+				p->partition_msdosparttable_type = part[i].sys_ind;
+
+
 				if (id->partition_count >= VOLUME_ID_PARTITIONS_MAX) {
 					dbg("to many partitions");
 					next = 0;

Index: volume_id.h
===================================================================
RCS file: /cvs/hal/hal/hald/linux/volume_id/volume_id.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- volume_id.h	15 Sep 2004 20:57:19 -0000	1.19
+++ volume_id.h	20 Sep 2004 01:25:54 -0000	1.20
@@ -68,6 +68,9 @@
 	char		*type;
 	unsigned long long off;
 	unsigned long long len;
+
+	unsigned int partition_number;
+	unsigned int partition_msdosparttable_type;
 };
 
 struct volume_id {




More information about the hal-commit mailing list