|
|
38852f |
---
|
|
|
38852f |
libmultipath/devmapper.c | 45 ---------------------------------------------
|
|
|
38852f |
libmultipath/devmapper.h | 1 -
|
|
|
38852f |
libmultipath/propsel.c | 2 --
|
|
|
38852f |
3 files changed, 48 deletions(-)
|
|
|
38852f |
|
|
|
38852f |
Index: multipath-tools-130222/libmultipath/devmapper.c
|
|
|
38852f |
===================================================================
|
|
|
38852f |
--- multipath-tools-130222.orig/libmultipath/devmapper.c
|
|
|
38852f |
+++ multipath-tools-130222/libmultipath/devmapper.c
|
|
|
38852f |
@@ -917,51 +917,6 @@ out:
|
|
|
38852f |
return r;
|
|
|
38852f |
}
|
|
|
38852f |
|
|
|
38852f |
-extern char *
|
|
|
38852f |
-dm_get_name(char *uuid)
|
|
|
38852f |
-{
|
|
|
38852f |
- struct dm_task *dmt;
|
|
|
38852f |
- struct dm_info info;
|
|
|
38852f |
- char *prefixed_uuid, *name = NULL;
|
|
|
38852f |
- const char *nametmp;
|
|
|
38852f |
-
|
|
|
38852f |
- dmt = dm_task_create(DM_DEVICE_INFO);
|
|
|
38852f |
- if (!dmt)
|
|
|
38852f |
- return NULL;
|
|
|
38852f |
-
|
|
|
38852f |
- prefixed_uuid = MALLOC(UUID_PREFIX_LEN + strlen(uuid) + 1);
|
|
|
38852f |
- if (!prefixed_uuid) {
|
|
|
38852f |
- condlog(0, "cannot create prefixed uuid : %s",
|
|
|
38852f |
- strerror(errno));
|
|
|
38852f |
- goto freeout;
|
|
|
38852f |
- }
|
|
|
38852f |
- sprintf(prefixed_uuid, UUID_PREFIX "%s", uuid);
|
|
|
38852f |
- if (!dm_task_set_uuid(dmt, prefixed_uuid))
|
|
|
38852f |
- goto freeout;
|
|
|
38852f |
-
|
|
|
38852f |
- if (!dm_task_run(dmt))
|
|
|
38852f |
- goto freeout;
|
|
|
38852f |
-
|
|
|
38852f |
- if (!dm_task_get_info(dmt, &info) || !info.exists)
|
|
|
38852f |
- goto freeout;
|
|
|
38852f |
-
|
|
|
38852f |
- nametmp = dm_task_get_name(dmt);
|
|
|
38852f |
- if (nametmp && strlen(nametmp)) {
|
|
|
38852f |
- name = MALLOC(strlen(nametmp) + 1);
|
|
|
38852f |
- if (name)
|
|
|
38852f |
- strcpy(name, nametmp);
|
|
|
38852f |
- } else {
|
|
|
38852f |
- condlog(2, "%s: no device-mapper name found", uuid);
|
|
|
38852f |
- }
|
|
|
38852f |
-
|
|
|
38852f |
-freeout:
|
|
|
38852f |
- if (prefixed_uuid)
|
|
|
38852f |
- FREE(prefixed_uuid);
|
|
|
38852f |
- dm_task_destroy(dmt);
|
|
|
38852f |
-
|
|
|
38852f |
- return name;
|
|
|
38852f |
-}
|
|
|
38852f |
-
|
|
|
38852f |
int
|
|
|
38852f |
dm_geteventnr (char *name)
|
|
|
38852f |
{
|
|
|
38852f |
Index: multipath-tools-130222/libmultipath/devmapper.h
|
|
|
38852f |
===================================================================
|
|
|
38852f |
--- multipath-tools-130222.orig/libmultipath/devmapper.h
|
|
|
38852f |
+++ multipath-tools-130222/libmultipath/devmapper.h
|
|
|
38852f |
@@ -40,7 +40,6 @@ int dm_remove_partmaps (const char * map
|
|
|
38852f |
int dm_get_uuid(char *name, char *uuid);
|
|
|
38852f |
int dm_get_info (char * mapname, struct dm_info ** dmi);
|
|
|
38852f |
int dm_rename (char * old, char * new);
|
|
|
38852f |
-char * dm_get_name(char * uuid);
|
|
|
38852f |
int dm_reassign(const char * mapname);
|
|
|
38852f |
int dm_reassign_table(const char *name, char *old, char *new);
|
|
|
38852f |
int dm_setgeometry(struct multipath *mpp);
|
|
|
38852f |
Index: multipath-tools-130222/libmultipath/propsel.c
|
|
|
38852f |
===================================================================
|
|
|
38852f |
--- multipath-tools-130222.orig/libmultipath/propsel.c
|
|
|
38852f |
+++ multipath-tools-130222/libmultipath/propsel.c
|
|
|
38852f |
@@ -263,8 +263,6 @@ select_alias (struct multipath * mp)
|
|
|
38852f |
conf->bindings_file, mp->alias_prefix, conf->bindings_read_only);
|
|
|
38852f |
}
|
|
|
38852f |
if (mp->alias == NULL)
|
|
|
38852f |
- mp->alias = dm_get_name(mp->wwid);
|
|
|
38852f |
- if (mp->alias == NULL)
|
|
|
38852f |
mp->alias = STRDUP(mp->wwid);
|
|
|
38852f |
}
|
|
|
38852f |
|