Lines Matching refs:cnt
224 int cnt = min(len, MAX_KLOG_WRITE_BUF_SZ); in dump_last_kmsg() local
228 nl = memrchr(ptr, '\n', cnt - 1); in dump_last_kmsg()
230 cnt = nl - ptr + 1; in dump_last_kmsg()
232 yoink = ptr[cnt]; in dump_last_kmsg()
233 ptr[cnt] = '\0'; in dump_last_kmsg()
235 ptr[cnt] = yoink; in dump_last_kmsg()
237 len -= cnt; in dump_last_kmsg()
238 ptr += cnt; in dump_last_kmsg()
252 size_t cnt; in read_file() local
258 cnt = read(fd, buf, sz - 1); in read_file()
259 if (cnt <= 0) in read_file()
261 buf[cnt] = '\0'; in read_file()
262 if (buf[cnt - 1] == '\n') { in read_file()
263 cnt--; in read_file()
264 buf[cnt] = '\0'; in read_file()
268 return cnt; in read_file()