]>
Commit | Line | Data |
---|---|---|
289c5516 MT |
1 | --- |
2 | libmultipath/devmapper.c | 45 --------------------------------------------- | |
3 | libmultipath/devmapper.h | 1 - | |
4 | libmultipath/propsel.c | 2 -- | |
5 | 3 files changed, 48 deletions(-) | |
6 | ||
7 | Index: multipath-tools-130222/libmultipath/devmapper.c | |
8 | =================================================================== | |
9 | --- multipath-tools-130222.orig/libmultipath/devmapper.c | |
10 | +++ multipath-tools-130222/libmultipath/devmapper.c | |
11 | @@ -917,51 +917,6 @@ out: | |
12 | return r; | |
13 | } | |
14 | ||
15 | -extern char * | |
16 | -dm_get_name(char *uuid) | |
17 | -{ | |
18 | - struct dm_task *dmt; | |
19 | - struct dm_info info; | |
20 | - char *prefixed_uuid, *name = NULL; | |
21 | - const char *nametmp; | |
22 | - | |
23 | - dmt = dm_task_create(DM_DEVICE_INFO); | |
24 | - if (!dmt) | |
25 | - return NULL; | |
26 | - | |
27 | - prefixed_uuid = MALLOC(UUID_PREFIX_LEN + strlen(uuid) + 1); | |
28 | - if (!prefixed_uuid) { | |
29 | - condlog(0, "cannot create prefixed uuid : %s", | |
30 | - strerror(errno)); | |
31 | - goto freeout; | |
32 | - } | |
33 | - sprintf(prefixed_uuid, UUID_PREFIX "%s", uuid); | |
34 | - if (!dm_task_set_uuid(dmt, prefixed_uuid)) | |
35 | - goto freeout; | |
36 | - | |
37 | - if (!dm_task_run(dmt)) | |
38 | - goto freeout; | |
39 | - | |
40 | - if (!dm_task_get_info(dmt, &info) || !info.exists) | |
41 | - goto freeout; | |
42 | - | |
43 | - nametmp = dm_task_get_name(dmt); | |
44 | - if (nametmp && strlen(nametmp)) { | |
45 | - name = MALLOC(strlen(nametmp) + 1); | |
46 | - if (name) | |
47 | - strcpy(name, nametmp); | |
48 | - } else { | |
49 | - condlog(2, "%s: no device-mapper name found", uuid); | |
50 | - } | |
51 | - | |
52 | -freeout: | |
53 | - if (prefixed_uuid) | |
54 | - FREE(prefixed_uuid); | |
55 | - dm_task_destroy(dmt); | |
56 | - | |
57 | - return name; | |
58 | -} | |
59 | - | |
60 | int | |
61 | dm_geteventnr (char *name) | |
62 | { | |
63 | Index: multipath-tools-130222/libmultipath/devmapper.h | |
64 | =================================================================== | |
65 | --- multipath-tools-130222.orig/libmultipath/devmapper.h | |
66 | +++ multipath-tools-130222/libmultipath/devmapper.h | |
67 | @@ -40,7 +40,6 @@ int dm_remove_partmaps (const char * map | |
68 | int dm_get_uuid(char *name, char *uuid); | |
69 | int dm_get_info (char * mapname, struct dm_info ** dmi); | |
70 | int dm_rename (char * old, char * new); | |
71 | -char * dm_get_name(char * uuid); | |
72 | int dm_reassign(const char * mapname); | |
73 | int dm_reassign_table(const char *name, char *old, char *new); | |
74 | int dm_setgeometry(struct multipath *mpp); | |
75 | Index: multipath-tools-130222/libmultipath/propsel.c | |
76 | =================================================================== | |
77 | --- multipath-tools-130222.orig/libmultipath/propsel.c | |
78 | +++ multipath-tools-130222/libmultipath/propsel.c | |
79 | @@ -263,8 +263,6 @@ select_alias (struct multipath * mp) | |
80 | conf->bindings_file, mp->alias_prefix, conf->bindings_read_only); | |
81 | } | |
82 | if (mp->alias == NULL) | |
83 | - mp->alias = dm_get_name(mp->wwid); | |
84 | - if (mp->alias == NULL) | |
85 | mp->alias = STRDUP(mp->wwid); | |
86 | } | |
87 |