hal/hald/linux/volume_id volume_id.c,1.38,1.39
Kay Sievers
kay at freedesktop.org
Thu Sep 23 23:19:44 PDT 2004
Update of /cvs/hal/hal/hald/linux/volume_id
In directory gabe:/tmp/cvs-serv24185/hald/linux/volume_id
Modified Files:
volume_id.c
Log Message:
2004-09-24 Kay Sievers <kay.sievers at vrfy.org>
* hald/linux/volume_id/volume_id.c: (probe_lvm2),
(volume_id_probe): probe for all raid types first, cause
probes for real filesystems may just be successful on raid
members
Index: volume_id.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/volume_id/volume_id.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- volume_id.c 20 Sep 2004 07:52:42 -0000 1.38
+++ volume_id.c 24 Sep 2004 06:19:42 -0000 1.39
@@ -321,7 +321,7 @@
found:
strncpy(id->type_version, lvm->type, 8);
id->usage_id = VOLUME_ID_RAID;
- id->type_id = VOLUME_ID_LVM1;
+ id->type_id = VOLUME_ID_LVM2;
id->type = "LVM2_member";
return 0;
@@ -2040,11 +2040,18 @@
break;
case VOLUME_ID_ALL:
default:
+ /* probe for raid first, cause fs probes may be successful on raid members */
rc = probe_linux_raid(id, off, size);
if (rc == 0)
break;
+ rc = probe_lvm1(id, off);
+ if (rc == 0)
+ break;
+ rc = probe_lvm2(id, off);
+ if (rc == 0)
+ break;
- /* signature in the first block */
+ /* signature in the first block, only small buffer needed */
rc = probe_ntfs(id, off);
if (rc == 0)
break;
@@ -2088,12 +2095,6 @@
rc = probe_ufs(id, off);
if (rc == 0)
break;
- rc = probe_lvm1(id, off);
- if (rc == 0)
- break;
- rc = probe_lvm2(id, off);
- if (rc == 0)
- break;
rc = -1;
}
More information about the hal-commit
mailing list