Lines Matching refs:len
129 size_t len; in __control_devkmsg() local
134 len = str_has_prefix(str, "on"); in __control_devkmsg()
135 if (len) { in __control_devkmsg()
137 return len; in __control_devkmsg()
140 len = str_has_prefix(str, "off"); in __control_devkmsg()
141 if (len) { in __control_devkmsg()
143 return len; in __control_devkmsg()
146 len = str_has_prefix(str, "ratelimit"); in __control_devkmsg()
147 if (len) { in __control_devkmsg()
149 return len; in __control_devkmsg()
601 ssize_t len; in msg_add_dict_text() local
606 len = msg_add_ext_text(buf, size, "", 0, ' '); /* dict prefix */ in msg_add_dict_text()
607 len += msg_add_ext_text(buf + len, size - len, key, strlen(key), '='); in msg_add_dict_text()
608 len += msg_add_ext_text(buf + len, size - len, val, val_len, '\n'); in msg_add_dict_text()
610 return len; in msg_add_dict_text()
617 ssize_t len; in msg_print_ext_body() local
619 len = msg_add_ext_text(buf, size, text, text_len, '\n'); in msg_print_ext_body()
624 len += msg_add_dict_text(buf + len, size - len, "SUBSYSTEM", in msg_print_ext_body()
626 len += msg_add_dict_text(buf + len, size - len, "DEVICE", in msg_print_ext_body()
629 return len; in msg_print_ext_body()
664 size_t len = iov_iter_count(from); in devkmsg_write() local
665 ssize_t ret = len; in devkmsg_write()
667 if (!user || len > LOG_LINE_MAX) in devkmsg_write()
672 return len; in devkmsg_write()
680 buf = kmalloc(len+1, GFP_KERNEL); in devkmsg_write()
684 buf[len] = '\0'; in devkmsg_write()
685 if (!copy_from_iter_full(buf, len, from)) { in devkmsg_write()
724 size_t len; in devkmsg_read() local
764 len = info_print_ext_header(user->buf, sizeof(user->buf), r->info); in devkmsg_read()
765 len += msg_print_ext_body(user->buf + len, sizeof(user->buf) - len, in devkmsg_read()
771 if (len > count) { in devkmsg_read()
776 if (copy_to_user(buf, user->buf, len)) { in devkmsg_read()
780 ret = len; in devkmsg_read()
1296 size_t len = 0; in info_print_prefix() local
1299 len = print_syslog((info->facility << 3) | info->level, buf); in info_print_prefix()
1302 len += print_time(info->ts_nsec, buf + len); in info_print_prefix()
1304 len += print_caller(info->caller_id, buf + len); in info_print_prefix()
1307 buf[len++] = ' '; in info_print_prefix()
1308 buf[len] = '\0'; in info_print_prefix()
1311 return len; in info_print_prefix()
1341 size_t len = 0; in record_print_text() local
1374 if (len + prefix_len + text_len + 1 + 1 > buf_size) { in record_print_text()
1376 if (len + prefix_len + line_len + 1 + 1 > buf_size) in record_print_text()
1379 text_len = buf_size - len - prefix_len - 1 - 1; in record_print_text()
1392 len += prefix_len + line_len + 1; in record_print_text()
1427 r->text_buf[len] = 0; in record_print_text()
1429 return len; in record_print_text()
1461 size_t len = 0; in find_first_fitting_seq() local
1468 len += get_record_print_text_size(&info, line_count, syslog, time); in find_first_fitting_seq()
1485 if (len <= size || info.seq >= max_seq) in find_first_fitting_seq()
1487 len -= get_record_print_text_size(&info, line_count, syslog, time); in find_first_fitting_seq()
1499 int len = 0; in syslog_print() local
1528 len = wait_event_interruptible(log_wait, in syslog_print()
1532 if (len) in syslog_print()
1568 } else if (!len){ in syslog_print()
1583 if (!len) in syslog_print()
1584 len = -EFAULT; in syslog_print()
1588 len += n; in syslog_print()
1595 return len; in syslog_print()
1603 int len = 0; in syslog_print_all() local
1621 len = 0; in syslog_print_all()
1627 if (len + textlen > size) { in syslog_print_all()
1632 if (copy_to_user(buf + len, text, textlen)) in syslog_print_all()
1633 len = -EFAULT; in syslog_print_all()
1635 len += textlen; in syslog_print_all()
1637 if (len < 0) in syslog_print_all()
1648 return len; in syslog_print_all()
1658 int do_syslog(int type, char __user *buf, int len, int source) in do_syslog() argument
1675 if (!buf || len < 0) in do_syslog()
1677 if (!len) in do_syslog()
1679 if (!access_ok(buf, len)) in do_syslog()
1681 error = syslog_print(buf, len); in do_syslog()
1689 if (!buf || len < 0) in do_syslog()
1691 if (!len) in do_syslog()
1693 if (!access_ok(buf, len)) in do_syslog()
1695 error = syslog_print_all(buf, len, clear); in do_syslog()
1716 if (len < 1 || len > 8) in do_syslog()
1718 if (len < minimum_console_loglevel) in do_syslog()
1719 len = minimum_console_loglevel; in do_syslog()
1720 console_loglevel = len; in do_syslog()
1771 SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len) in SYSCALL_DEFINE3() argument
1773 return do_syslog(type, buf, len, SYSLOG_FROM_READER); in SYSCALL_DEFINE3()
1931 static void call_console_driver(struct console *con, const char *text, size_t len, in call_console_driver() argument
1944 con->write(con, text, len); in call_console_driver()
2334 static void call_console_driver(struct console *con, const char *text, size_t len, in call_console_driver() argument
2704 size_t len; in console_emit_next_record() local
2730 len = info_print_ext_header(ext_text, CONSOLE_EXT_LOG_MAX, r.info); in console_emit_next_record()
2731 len += msg_print_ext_body(ext_text + len, CONSOLE_EXT_LOG_MAX - len, in console_emit_next_record()
2735 len = record_print_text(&r, console_msg_format & MSG_FORMAT_SYSLOG, printk_time); in console_emit_next_record()
2752 call_console_driver(con, write_text, len, dropped_text); in console_emit_next_record()
3731 char *line, size_t size, size_t *len) in kmsg_dump_get_line() argument
3763 if (len) in kmsg_dump_get_line()
3764 *len = l; in kmsg_dump_get_line()
3796 size_t len = 0; in kmsg_dump_get_buffer() local
3834 len = 0; in kmsg_dump_get_buffer()
3839 len += record_print_text(&r, syslog, time); in kmsg_dump_get_buffer()
3842 prb_rec_init_rd(&r, &info, buf + len, size - len); in kmsg_dump_get_buffer()
3849 *len_out = len; in kmsg_dump_get_buffer()