Blame SOURCES/0037-RHBZ-768873-fix-rename.patch

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