Lines Matching defs:buf
25 static int get_integer(const char *buf, size_t count)
33 memcpy(tmp, buf, count);
41 static int get_boolean(const char *buf, size_t count)
44 if (buf[0] == '1')
46 if (buf[0] == '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)
66 char *buf)
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"
100 const char *buf, size_t count)
110 mode = get_integer(buf, count);
147 char *buf)
158 count = snprintf(buf, PAGE_SIZE, "1 (Short Preamble"
161 count = snprintf(buf, PAGE_SIZE, "0 (Short Preamble"
171 const char *buf, size_t count)
180 value = get_boolean(buf, count);