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

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