Lines Matching refs:count

38 static int get_integer(const char *buf, size_t count)  in get_integer()  argument
43 if (count == 0) in get_integer()
45 count = min_t(size_t, count, 10); in get_integer()
46 memcpy(tmp, buf, count); in get_integer()
52 static int get_boolean(const char *buf, size_t count) in get_boolean() argument
54 if (count != 0) { in get_boolean()
59 if (count >= 4 && memcmp(buf, "true", 4) == 0) in get_boolean()
61 if (count >= 5 && memcmp(buf, "false", 5) == 0) in get_boolean()
63 if (count >= 3 && memcmp(buf, "yes", 3) == 0) in get_boolean()
65 if (count >= 2 && memcmp(buf, "no", 2) == 0) in get_boolean()
67 if (count >= 2 && memcmp(buf, "on", 2) == 0) in get_boolean()
69 if (count >= 3 && memcmp(buf, "off", 3) == 0) in get_boolean()
80 ssize_t count = 0; in b43legacy_attr_interfmode_show() local
89 count = snprintf(buf, PAGE_SIZE, "0 (No Interference" in b43legacy_attr_interfmode_show()
93 count = snprintf(buf, PAGE_SIZE, "1 (Non-WLAN Interference" in b43legacy_attr_interfmode_show()
97 count = snprintf(buf, PAGE_SIZE, "2 (WLAN Interference" in b43legacy_attr_interfmode_show()
106 return count; in b43legacy_attr_interfmode_show()
111 const char *buf, size_t count) in b43legacy_attr_interfmode_store() argument
121 mode = get_integer(buf, count); in b43legacy_attr_interfmode_store()
150 return err ? err : count; in b43legacy_attr_interfmode_store()
162 ssize_t count; in b43legacy_attr_preamble_show() local
170 count = snprintf(buf, PAGE_SIZE, "1 (Short Preamble" in b43legacy_attr_preamble_show()
173 count = snprintf(buf, PAGE_SIZE, "0 (Short Preamble" in b43legacy_attr_preamble_show()
178 return count; in b43legacy_attr_preamble_show()
183 const char *buf, size_t count) in b43legacy_attr_preamble_store() argument
192 value = get_boolean(buf, count); in b43legacy_attr_preamble_store()
203 return count; in b43legacy_attr_preamble_store()