Lines Matching refs:count

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