]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blame - multipath-tools/patches/0111-RH-dont-show-pg-timeout.patch
multipath-tools: Update to snapshot from 2013-02-22
[people/pmueller/ipfire-3.x.git] / multipath-tools / patches / 0111-RH-dont-show-pg-timeout.patch
CommitLineData
289c5516
MT
1---
2 libmultipath/dict.c | 97 ----------------------------------------------------
3 1 file changed, 97 deletions(-)
4
5Index: multipath-tools-130222/libmultipath/dict.c
6===================================================================
7--- multipath-tools-130222.orig/libmultipath/dict.c
8+++ multipath-tools-130222/libmultipath/dict.c
9@@ -473,26 +473,6 @@ def_checker_timeout_handler(vector strve
10 static int
11 def_pg_timeout_handler(vector strvec)
12 {
13- int pg_timeout;
14- char * buff;
15-
16- buff = set_value(strvec);
17-
18- if (!buff)
19- return 1;
20-
21- if (strlen(buff) == 4 && !strcmp(buff, "none"))
22- conf->pg_timeout = -PGTIMEOUT_NONE;
23- else if (sscanf(buff, "%d", &pg_timeout) == 1 && pg_timeout >= 0) {
24- if (pg_timeout == 0)
25- conf->pg_timeout = -PGTIMEOUT_NONE;
26- else
27- conf->pg_timeout = pg_timeout;
28- }
29- else
30- conf->pg_timeout = PGTIMEOUT_UNDEF;
31-
32- FREE(buff);
33 return 0;
34 }
35
36@@ -1358,30 +1338,6 @@ hw_minio_rq_handler(vector strvec)
37 static int
38 hw_pg_timeout_handler(vector strvec)
39 {
40- int pg_timeout;
41- struct hwentry *hwe = VECTOR_LAST_SLOT(conf->hwtable);
42- char *buff;
43-
44- if (!hwe)
45- return 1;
46-
47- buff = set_value(strvec);
48-
49- if (!buff)
50- return 1;
51-
52- if (strlen(buff) == 4 && !strcmp(buff, "none"))
53- hwe->pg_timeout = -PGTIMEOUT_NONE;
54- else if (sscanf(buff, "%d", &pg_timeout) == 1 && pg_timeout >= 0) {
55- if (pg_timeout == 0)
56- hwe->pg_timeout = -PGTIMEOUT_NONE;
57- else
58- hwe->pg_timeout = pg_timeout;
59- }
60- else
61- hwe->pg_timeout = PGTIMEOUT_UNDEF;
62-
63- FREE(buff);
64 return 0;
65 }
66
67@@ -1819,29 +1775,6 @@ mp_minio_rq_handler(vector strvec)
68 static int
69 mp_pg_timeout_handler(vector strvec)
70 {
71- int pg_timeout;
72- struct mpentry *mpe = VECTOR_LAST_SLOT(conf->mptable);
73- char *buff;
74-
75- if (!mpe)
76- return 1;
77-
78- buff = set_value(strvec);
79-
80- if (!buff)
81- return 1;
82- if (strlen(buff) == 4 && !strcmp(buff, "none"))
83- mpe->pg_timeout = -PGTIMEOUT_NONE;
84- else if (sscanf(buff, "%d", &pg_timeout) == 1 && pg_timeout >= 0) {
85- if (pg_timeout == 0)
86- mpe->pg_timeout = -PGTIMEOUT_NONE;
87- else
88- mpe->pg_timeout = pg_timeout;
89- }
90- else
91- mpe->pg_timeout = PGTIMEOUT_UNDEF;
92-
93- FREE(buff);
94 return 0;
95 }
96
97@@ -2180,16 +2113,6 @@ snprint_mp_rr_min_io_rq (char * buff, in
98 static int
99 snprint_mp_pg_timeout (char * buff, int len, void * data)
100 {
101- struct mpentry * mpe = (struct mpentry *)data;
102-
103- switch (mpe->pg_timeout) {
104- case PGTIMEOUT_UNDEF:
105- break;
106- case -PGTIMEOUT_NONE:
107- return snprintf(buff, len, "\"none\"");
108- default:
109- return snprintf(buff, len, "%i", mpe->pg_timeout);
110- }
111 return 0;
112 }
113
114@@ -2551,19 +2474,6 @@ snprint_hw_rr_min_io_rq (char * buff, in
115 static int
116 snprint_hw_pg_timeout (char * buff, int len, void * data)
117 {
118- struct hwentry * hwe = (struct hwentry *)data;
119-
120- if (!hwe->pg_timeout)
121- return 0;
122-
123- switch (hwe->pg_timeout) {
124- case PGTIMEOUT_UNDEF:
125- break;
126- case -PGTIMEOUT_NONE:
127- return snprintf(buff, len, "\"none\"");
128- default:
129- return snprintf(buff, len, "%i", hwe->pg_timeout);
130- }
131 return 0;
132 }
133
134@@ -2895,13 +2805,6 @@ snprint_def_checker_timeout (char *buff,
135 static int
136 snprint_def_pg_timeout (char * buff, int len, void * data)
137 {
138- switch (conf->pg_timeout) {
139- case PGTIMEOUT_UNDEF:
140- case -PGTIMEOUT_NONE:
141- return snprintf(buff, len, "\"none\"");
142- default:
143- return snprintf(buff, len, "%i", conf->pg_timeout);
144- }
145 return 0;
146 }
147