|
|
4728c8 |
---
|
|
|
4728c8 |
libmultipath/dict.c | 97 ----------------------------------------------------
|
|
|
4728c8 |
1 file changed, 97 deletions(-)
|
|
|
4728c8 |
|
|
|
4728c8 |
Index: multipath-tools-130222/libmultipath/dict.c
|
|
|
4728c8 |
===================================================================
|
|
|
4728c8 |
--- multipath-tools-130222.orig/libmultipath/dict.c
|
|
|
4728c8 |
+++ multipath-tools-130222/libmultipath/dict.c
|
|
|
4728c8 |
@@ -473,26 +473,6 @@ def_checker_timeout_handler(vector strve
|
|
|
4728c8 |
static int
|
|
|
4728c8 |
def_pg_timeout_handler(vector strvec)
|
|
|
4728c8 |
{
|
|
|
4728c8 |
- int pg_timeout;
|
|
|
4728c8 |
- char * buff;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- buff = set_value(strvec);
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- if (!buff)
|
|
|
4728c8 |
- return 1;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- if (strlen(buff) == 4 && !strcmp(buff, "none"))
|
|
|
4728c8 |
- conf->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
4728c8 |
- else if (sscanf(buff, "%d", &pg_timeout) == 1 && pg_timeout >= 0) {
|
|
|
4728c8 |
- if (pg_timeout == 0)
|
|
|
4728c8 |
- conf->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
4728c8 |
- else
|
|
|
4728c8 |
- conf->pg_timeout = pg_timeout;
|
|
|
4728c8 |
- }
|
|
|
4728c8 |
- else
|
|
|
4728c8 |
- conf->pg_timeout = PGTIMEOUT_UNDEF;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- FREE(buff);
|
|
|
4728c8 |
return 0;
|
|
|
4728c8 |
}
|
|
|
4728c8 |
|
|
|
4728c8 |
@@ -1358,30 +1338,6 @@ hw_minio_rq_handler(vector strvec)
|
|
|
4728c8 |
static int
|
|
|
4728c8 |
hw_pg_timeout_handler(vector strvec)
|
|
|
4728c8 |
{
|
|
|
4728c8 |
- int pg_timeout;
|
|
|
4728c8 |
- struct hwentry *hwe = VECTOR_LAST_SLOT(conf->hwtable);
|
|
|
4728c8 |
- char *buff;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- if (!hwe)
|
|
|
4728c8 |
- return 1;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- buff = set_value(strvec);
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- if (!buff)
|
|
|
4728c8 |
- return 1;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- if (strlen(buff) == 4 && !strcmp(buff, "none"))
|
|
|
4728c8 |
- hwe->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
4728c8 |
- else if (sscanf(buff, "%d", &pg_timeout) == 1 && pg_timeout >= 0) {
|
|
|
4728c8 |
- if (pg_timeout == 0)
|
|
|
4728c8 |
- hwe->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
4728c8 |
- else
|
|
|
4728c8 |
- hwe->pg_timeout = pg_timeout;
|
|
|
4728c8 |
- }
|
|
|
4728c8 |
- else
|
|
|
4728c8 |
- hwe->pg_timeout = PGTIMEOUT_UNDEF;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- FREE(buff);
|
|
|
4728c8 |
return 0;
|
|
|
4728c8 |
}
|
|
|
4728c8 |
|
|
|
4728c8 |
@@ -1819,29 +1775,6 @@ mp_minio_rq_handler(vector strvec)
|
|
|
4728c8 |
static int
|
|
|
4728c8 |
mp_pg_timeout_handler(vector strvec)
|
|
|
4728c8 |
{
|
|
|
4728c8 |
- int pg_timeout;
|
|
|
4728c8 |
- struct mpentry *mpe = VECTOR_LAST_SLOT(conf->mptable);
|
|
|
4728c8 |
- char *buff;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- if (!mpe)
|
|
|
4728c8 |
- return 1;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- buff = set_value(strvec);
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- if (!buff)
|
|
|
4728c8 |
- return 1;
|
|
|
4728c8 |
- if (strlen(buff) == 4 && !strcmp(buff, "none"))
|
|
|
4728c8 |
- mpe->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
4728c8 |
- else if (sscanf(buff, "%d", &pg_timeout) == 1 && pg_timeout >= 0) {
|
|
|
4728c8 |
- if (pg_timeout == 0)
|
|
|
4728c8 |
- mpe->pg_timeout = -PGTIMEOUT_NONE;
|
|
|
4728c8 |
- else
|
|
|
4728c8 |
- mpe->pg_timeout = pg_timeout;
|
|
|
4728c8 |
- }
|
|
|
4728c8 |
- else
|
|
|
4728c8 |
- mpe->pg_timeout = PGTIMEOUT_UNDEF;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- FREE(buff);
|
|
|
4728c8 |
return 0;
|
|
|
4728c8 |
}
|
|
|
4728c8 |
|
|
|
4728c8 |
@@ -2180,16 +2113,6 @@ snprint_mp_rr_min_io_rq (char * buff, in
|
|
|
4728c8 |
static int
|
|
|
4728c8 |
snprint_mp_pg_timeout (char * buff, int len, void * data)
|
|
|
4728c8 |
{
|
|
|
4728c8 |
- struct mpentry * mpe = (struct mpentry *)data;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- switch (mpe->pg_timeout) {
|
|
|
4728c8 |
- case PGTIMEOUT_UNDEF:
|
|
|
4728c8 |
- break;
|
|
|
4728c8 |
- case -PGTIMEOUT_NONE:
|
|
|
4728c8 |
- return snprintf(buff, len, "\"none\"");
|
|
|
4728c8 |
- default:
|
|
|
4728c8 |
- return snprintf(buff, len, "%i", mpe->pg_timeout);
|
|
|
4728c8 |
- }
|
|
|
4728c8 |
return 0;
|
|
|
4728c8 |
}
|
|
|
4728c8 |
|
|
|
4728c8 |
@@ -2551,19 +2474,6 @@ snprint_hw_rr_min_io_rq (char * buff, in
|
|
|
4728c8 |
static int
|
|
|
4728c8 |
snprint_hw_pg_timeout (char * buff, int len, void * data)
|
|
|
4728c8 |
{
|
|
|
4728c8 |
- struct hwentry * hwe = (struct hwentry *)data;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- if (!hwe->pg_timeout)
|
|
|
4728c8 |
- return 0;
|
|
|
4728c8 |
-
|
|
|
4728c8 |
- switch (hwe->pg_timeout) {
|
|
|
4728c8 |
- case PGTIMEOUT_UNDEF:
|
|
|
4728c8 |
- break;
|
|
|
4728c8 |
- case -PGTIMEOUT_NONE:
|
|
|
4728c8 |
- return snprintf(buff, len, "\"none\"");
|
|
|
4728c8 |
- default:
|
|
|
4728c8 |
- return snprintf(buff, len, "%i", hwe->pg_timeout);
|
|
|
4728c8 |
- }
|
|
|
4728c8 |
return 0;
|
|
|
4728c8 |
}
|
|
|
4728c8 |
|
|
|
4728c8 |
@@ -2895,13 +2805,6 @@ snprint_def_checker_timeout (char *buff,
|
|
|
4728c8 |
static int
|
|
|
4728c8 |
snprint_def_pg_timeout (char * buff, int len, void * data)
|
|
|
4728c8 |
{
|
|
|
4728c8 |
- switch (conf->pg_timeout) {
|
|
|
4728c8 |
- case PGTIMEOUT_UNDEF:
|
|
|
4728c8 |
- case -PGTIMEOUT_NONE:
|
|
|
4728c8 |
- return snprintf(buff, len, "\"none\"");
|
|
|
4728c8 |
- default:
|
|
|
4728c8 |
- return snprintf(buff, len, "%i", conf->pg_timeout);
|
|
|
4728c8 |
- }
|
|
|
4728c8 |
return 0;
|
|
|
4728c8 |
}
|
|
|
4728c8 |
|