@@ -410,7 +410,7 @@ static bool alias_already_taken(const char *alias, const char *map_wwid)
char wwid[WWID_SIZE];
/* If the map doesn't exist, it's fine */
- if (dm_get_uuid(alias, wwid, sizeof(wwid)) != 0)
+ if (dm_get_wwid(alias, wwid, sizeof(wwid)) != 0)
return false;
/* If both the name and the wwid match, it's fine.*/
@@ -846,7 +846,7 @@ int domap(struct multipath *mpp, char *params, int is_daemon)
if (mpp->action == ACT_CREATE && dm_map_present(mpp->alias)) {
char wwid[WWID_SIZE];
- if (dm_get_uuid(mpp->alias, wwid, sizeof(wwid)) == 0) {
+ if (dm_get_wwid(mpp->alias, wwid, sizeof(wwid)) == 0) {
if (!strncmp(mpp->wwid, wwid, sizeof(wwid))) {
condlog(3, "%s: map already present",
mpp->alias);
@@ -1320,7 +1320,7 @@ static int _get_refwwid(enum mpath_cmds cmd, const char *dev,
break;
case DEV_DEVMAP:
- if (((dm_get_uuid(dev, tmpwwid, WWID_SIZE)) == 0)
+ if (((dm_get_wwid(dev, tmpwwid, WWID_SIZE)) == 0)
&& (strlen(tmpwwid)))
refwwid = tmpwwid;
@@ -840,7 +840,7 @@ int dm_get_map(const char *name, unsigned long long *size, char **outparams)
}
}
-int dm_get_uuid(const char *name, char *uuid, int uuid_len)
+int dm_get_wwid(const char *name, char *uuid, int uuid_len)
{
char tmp[DM_UUID_LEN];
@@ -1388,7 +1388,7 @@ struct multipath *dm_get_multipath(const char *name)
if (dm_get_map(name, &mpp->size, NULL) != DMP_OK)
goto out;
- if (dm_get_uuid(name, mpp->wwid, WWID_SIZE) != 0)
+ if (dm_get_wwid(name, mpp->wwid, WWID_SIZE) != 0)
condlog(2, "%s: failed to get uuid for %s", __func__, name);
if (dm_get_info(name, &mpp->dmi) != 0)
condlog(2, "%s: failed to get info for %s", __func__, name);
@@ -175,7 +175,7 @@ int dm_geteventnr (const char *name);
int dm_is_suspended(const char *name);
int dm_get_major_minor (const char *name, int *major, int *minor);
char * dm_mapname(int major, int minor);
-int dm_get_uuid(const char *name, char *uuid, int uuid_len);
+int dm_get_wwid(const char *name, char *uuid, int uuid_len);
bool has_dm_info(const struct multipath *mpp);
int dm_rename (const char * old, char * new, char * delim, int skip_kpartx);
int dm_reassign(const char * mapname);
@@ -81,7 +81,7 @@ global:
dm_get_major_minor;
dm_get_maps;
dm_get_multipath;
- dm_get_uuid;
+ dm_get_wwid;
dm_is_mpath;
dm_mapname;
dm_prereq;
@@ -295,7 +295,7 @@ should_multipath(struct path *pp1, vector pathvec, vector mpvec)
struct multipath *mp = find_mp_by_wwid(mpvec, pp1->wwid);
if (mp != NULL &&
- dm_get_uuid(mp->alias, tmp_wwid, WWID_SIZE) == 0 &&
+ dm_get_wwid(mp->alias, tmp_wwid, WWID_SIZE) == 0 &&
!strncmp(tmp_wwid, pp1->wwid, WWID_SIZE)) {
condlog(3, "wwid %s is already multipathed, keeping it",
pp1->wwid);
@@ -727,7 +727,7 @@ add_map_without_path (struct vectors *vecs, const char *alias)
goto out;
}
if (!strlen(mpp->wwid))
- dm_get_uuid(mpp->alias, mpp->wwid, WWID_SIZE);
+ dm_get_wwid(mpp->alias, mpp->wwid, WWID_SIZE);
if (!strlen(mpp->wwid))
condlog(1, "%s: adding map with empty WWID", mpp->alias);
conf = get_multipath_config();
@@ -76,7 +76,7 @@ int WRAP_FUNC(mkstemp)(char *template)
return 10;
}
-int __wrap_dm_get_uuid(const char *name, char *uuid, int uuid_len)
+int __wrap_dm_get_wwid(const char *name, char *uuid, int uuid_len)
{
int ret;
@@ -436,17 +436,17 @@ static int test_scan_devname(void)
static void mock_unused_alias(const char *alias)
{
- expect_string(__wrap_dm_get_uuid, name, alias);
- expect_value(__wrap_dm_get_uuid, uuid_len, WWID_SIZE);
- will_return(__wrap_dm_get_uuid, 1);
+ expect_string(__wrap_dm_get_wwid, name, alias);
+ expect_value(__wrap_dm_get_wwid, uuid_len, WWID_SIZE);
+ will_return(__wrap_dm_get_wwid, 1);
}
static void mock_self_alias(const char *alias, const char *wwid)
{
- expect_string(__wrap_dm_get_uuid, name, alias);
- expect_value(__wrap_dm_get_uuid, uuid_len, WWID_SIZE);
- will_return(__wrap_dm_get_uuid, 0);
- will_return(__wrap_dm_get_uuid, wwid);
+ expect_string(__wrap_dm_get_wwid, name, alias);
+ expect_value(__wrap_dm_get_wwid, uuid_len, WWID_SIZE);
+ will_return(__wrap_dm_get_wwid, 0);
+ will_return(__wrap_dm_get_wwid, wwid);
}
#define USED_STR(alias_str, wwid_str) wwid_str ": alias '" alias_str "' already taken, reselecting alias\n"
@@ -469,17 +469,17 @@ static void mock_self_alias(const char *alias, const char *wwid)
#define mock_failed_alias(alias, wwid) \
do { \
- expect_string(__wrap_dm_get_uuid, name, alias); \
- expect_value(__wrap_dm_get_uuid, uuid_len, WWID_SIZE); \
- will_return(__wrap_dm_get_uuid, 1); \
+ expect_string(__wrap_dm_get_wwid, name, alias); \
+ expect_value(__wrap_dm_get_wwid, uuid_len, WWID_SIZE); \
+ will_return(__wrap_dm_get_wwid, 1); \
} while (0)
#define mock_used_alias(alias, wwid) \
do { \
- expect_string(__wrap_dm_get_uuid, name, alias); \
- expect_value(__wrap_dm_get_uuid, uuid_len, WWID_SIZE); \
- will_return(__wrap_dm_get_uuid, 0); \
- will_return(__wrap_dm_get_uuid, "WWID_USED"); \
+ expect_string(__wrap_dm_get_wwid, name, alias); \
+ expect_value(__wrap_dm_get_wwid, uuid_len, WWID_SIZE); \
+ will_return(__wrap_dm_get_wwid, 0); \
+ will_return(__wrap_dm_get_wwid, "WWID_USED"); \
expect_condlog(3, USED_STR(alias, wwid)); \
} while(0)