2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+git20070330/mount/fstab.c
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+git20070330.orig/mount/fstab.c
|
|
|
|
+++ util-linux-ng-2.12r+git20070330/mount/fstab.c
|
|
|
|
@@ -295,7 +295,7 @@ has_uuid(const char *device, const char
|
2006-12-19 00:18:10 +01:00
|
|
|
const char *devuuid;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
- devuuid = mount_get_devname_by_uuid(device);
|
|
|
|
+ devuuid = mount_get_volume_uuid_by_spec(device);
|
|
|
|
ret = !strcmp(uuid, devuuid);
|
|
|
|
/* free(devuuid); */
|
|
|
|
return ret;
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+git20070330/mount/mount_blkid.c
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+git20070330.orig/mount/mount_blkid.c
|
|
|
|
+++ util-linux-ng-2.12r+git20070330/mount/mount_blkid.c
|
2006-12-19 00:18:10 +01:00
|
|
|
@@ -16,6 +16,11 @@ mount_blkid_put_cache(void) {
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *
|
|
|
|
+mount_get_volume_uuid_by_spec(const char *spec) {
|
|
|
|
+ return blkid_get_tag_value(blkid, "UUID", spec);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const char *
|
|
|
|
mount_get_volume_label_by_spec(const char *spec) {
|
|
|
|
return blkid_get_tag_value(blkid, "LABEL", spec);
|
|
|
|
}
|
|
|
|
@@ -56,6 +61,11 @@ mount_blkid_put_cache(void) {
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *
|
|
|
|
+mount_get_volume_uuid_by_spec(const char *spec) {
|
|
|
|
+ return xstrdup(get_volume_uuid_by_spec(spec));
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const char *
|
|
|
|
mount_get_volume_label_by_spec(const char *spec) {
|
|
|
|
return xstrdup(get_volume_label_by_spec(spec));
|
|
|
|
}
|
2007-04-12 18:31:42 +02:00
|
|
|
Index: util-linux-ng-2.12r+git20070330/mount/mount_blkid.h
|
|
|
|
===================================================================
|
|
|
|
--- util-linux-ng-2.12r+git20070330.orig/mount/mount_blkid.h
|
|
|
|
+++ util-linux-ng-2.12r+git20070330/mount/mount_blkid.h
|
2006-12-19 00:18:10 +01:00
|
|
|
@@ -7,6 +7,7 @@ extern void mount_blkid_get_cache(void);
|
|
|
|
extern void mount_blkid_put_cache(void);
|
|
|
|
extern const char *mount_get_devname_by_uuid(const char *uuid);
|
|
|
|
extern const char *mount_get_devname_by_label(const char *label);
|
|
|
|
+extern const char *mount_get_volume_uuid_by_spec(const char *spec);
|
|
|
|
extern const char *mount_get_volume_label_by_spec(const char *spec);
|
|
|
|
extern const char *mount_get_devname(const char *spec);
|
|
|
|
extern const char *mount_get_devname_for_mounting(const char *spec);
|