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