Lines Matching refs:len
121 size_t len; in __control_devkmsg() local
126 len = str_has_prefix(str, "on"); in __control_devkmsg()
127 if (len) { in __control_devkmsg()
129 return len; in __control_devkmsg()
132 len = str_has_prefix(str, "off"); in __control_devkmsg()
133 if (len) { in __control_devkmsg()
135 return len; in __control_devkmsg()
138 len = str_has_prefix(str, "ratelimit"); in __control_devkmsg()
139 if (len) { in __control_devkmsg()
141 return len; in __control_devkmsg()
370 u16 len; /* length of entire record */ member
496 if (!msg->len) in log_from_idx()
512 if (!msg->len) { in log_next()
514 return msg->len; in log_next()
516 return idx + msg->len; in log_next()
656 msg->len = size; in log_store()
659 log_next_idx += msg->len; in log_store()
812 size_t len = iov_iter_count(from); in devkmsg_write() local
813 ssize_t ret = len; in devkmsg_write()
815 if (!user || len > LOG_LINE_MAX) in devkmsg_write()
820 return len; in devkmsg_write()
828 buf = kmalloc(len+1, GFP_KERNEL); in devkmsg_write()
832 buf[len] = '\0'; in devkmsg_write()
833 if (!copy_from_iter_full(buf, len, from)) { in devkmsg_write()
858 len -= endp - line; in devkmsg_write()
873 size_t len; in devkmsg_read() local
909 len = msg_print_ext_header(user->buf, sizeof(user->buf), in devkmsg_read()
911 len += msg_print_ext_body(user->buf + len, sizeof(user->buf) - len, in devkmsg_read()
919 if (len > count) { in devkmsg_read()
924 if (copy_to_user(buf, user->buf, len)) { in devkmsg_read()
928 ret = len; in devkmsg_read()
1074 VMCOREINFO_OFFSET(printk_log, len); in log_buf_vmcoreinfo_setup()
1291 size_t len = 0; in print_prefix() local
1294 len = print_syslog((msg->facility << 3) | msg->level, buf); in print_prefix()
1297 len += print_time(msg->ts_nsec, buf + len); in print_prefix()
1299 len += print_caller(msg->caller_id, buf + len); in print_prefix()
1302 buf[len++] = ' '; in print_prefix()
1303 buf[len] = '\0'; in print_prefix()
1306 return len; in print_prefix()
1314 size_t len = 0; in msg_print_text() local
1331 if (prefix_len + text_len + 1 >= size - len) in msg_print_text()
1334 memcpy(buf + len, prefix, prefix_len); in msg_print_text()
1335 len += prefix_len; in msg_print_text()
1336 memcpy(buf + len, text, text_len); in msg_print_text()
1337 len += text_len; in msg_print_text()
1338 buf[len++] = '\n'; in msg_print_text()
1341 len += prefix_len + text_len + 1; in msg_print_text()
1347 return len; in msg_print_text()
1354 int len = 0; in syslog_print() local
1393 } else if (!len){ in syslog_print()
1405 if (!len) in syslog_print()
1406 len = -EFAULT; in syslog_print()
1410 len += n; in syslog_print()
1416 return len; in syslog_print()
1422 int len = 0; in syslog_print_all() local
1443 len += msg_print_text(msg, true, time, NULL, 0); in syslog_print_all()
1451 while (len > size && seq < log_next_seq) { in syslog_print_all()
1454 len -= msg_print_text(msg, true, time, NULL, 0); in syslog_print_all()
1462 len = 0; in syslog_print_all()
1463 while (len >= 0 && seq < next_seq) { in syslog_print_all()
1472 if (copy_to_user(buf + len, text, textlen)) in syslog_print_all()
1473 len = -EFAULT; in syslog_print_all()
1475 len += textlen; in syslog_print_all()
1492 return len; in syslog_print_all()
1503 int do_syslog(int type, char __user *buf, int len, int source) in do_syslog() argument
1519 if (!buf || len < 0) in do_syslog()
1521 if (!len) in do_syslog()
1523 if (!access_ok(buf, len)) in do_syslog()
1529 error = syslog_print(buf, len); in do_syslog()
1537 if (!buf || len < 0) in do_syslog()
1539 if (!len) in do_syslog()
1541 if (!access_ok(buf, len)) in do_syslog()
1543 error = syslog_print_all(buf, len, clear); in do_syslog()
1564 if (len < 1 || len > 8) in do_syslog()
1566 if (len < minimum_console_loglevel) in do_syslog()
1567 len = minimum_console_loglevel; in do_syslog()
1568 console_loglevel = len; in do_syslog()
1618 SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len) in SYSCALL_DEFINE3() argument
1620 return do_syslog(type, buf, len, SYSLOG_FROM_READER); in SYSCALL_DEFINE3()
1769 const char *text, size_t len) in call_console_drivers() argument
1773 trace_console_rcuidle(text, len); in call_console_drivers()
1791 con->write(con, text, len); in call_console_drivers()
1823 size_t len; /* length == 0 means unused buffer */ member
1833 if (cont.len == 0) in cont_flush()
1837 cont.ts_nsec, NULL, 0, cont.buf, cont.len); in cont_flush()
1838 cont.len = 0; in cont_flush()
1842 enum log_flags flags, const char *text, size_t len) in cont_add() argument
1845 if (cont.len + len > sizeof(cont.buf)) { in cont_add()
1850 if (!cont.len) { in cont_add()
1858 memcpy(cont.buf + cont.len, text, len); in cont_add()
1859 cont.len += len; in cont_add()
1879 if (cont.len) { in log_output()
2090 const char *text, size_t len) {} in call_console_drivers() argument
2411 size_t len; in console_unlock() local
2416 len = sprintf(text, in console_unlock()
2424 len = 0; in console_unlock()
2448 len += msg_print_text(msg, in console_unlock()
2450 printk_time, text + len, sizeof(text) - len); in console_unlock()
2473 call_console_drivers(ext_text, ext_len, text, len); in console_unlock()
3164 char *line, size_t size, size_t *len) in kmsg_dump_get_line_nolock() argument
3190 if (len) in kmsg_dump_get_line_nolock()
3191 *len = l; in kmsg_dump_get_line_nolock()
3213 char *line, size_t size, size_t *len) in kmsg_dump_get_line() argument
3219 ret = kmsg_dump_get_line_nolock(dumper, syslog, line, size, len); in kmsg_dump_get_line()
3246 char *buf, size_t size, size_t *len) in kmsg_dump_get_buffer() argument
3313 if (len) in kmsg_dump_get_buffer()
3314 *len = l; in kmsg_dump_get_buffer()