Lines Matching refs:count
25 static int get_integer(const char *buf, size_t count)
30 if (count == 0)
32 count = min_t(size_t, count, 10);
33 memcpy(tmp, buf, count);
41 static int get_boolean(const char *buf, size_t count)
43 if (count != 0) {
48 if (count >= 4 && memcmp(buf, "true", 4) == 0)
50 if (count >= 5 && memcmp(buf, "false", 5) == 0)
52 if (count >= 3 && memcmp(buf, "yes", 3) == 0)
54 if (count >= 2 && memcmp(buf, "no", 2) == 0)
56 if (count >= 2 && memcmp(buf, "on", 2) == 0)
58 if (count >= 3 && memcmp(buf, "off", 3) == 0)
69 ssize_t count = 0;
78 count = snprintf(buf, PAGE_SIZE, "0 (No Interference"
82 count = snprintf(buf, PAGE_SIZE, "1 (Non-WLAN Interference"
86 count = snprintf(buf, PAGE_SIZE, "2 (WLAN Interference"
95 return count;
100 const char *buf, size_t count)
110 mode = get_integer(buf, count);
138 return err ? err : count;
150 ssize_t count;
158 count = snprintf(buf, PAGE_SIZE, "1 (Short Preamble"
161 count = snprintf(buf, PAGE_SIZE, "0 (Short Preamble"
166 return count;
171 const char *buf, size_t count)
180 value = get_boolean(buf, count);
191 return count;