You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

147 lines
3.3 KiB

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