Lines Matching refs:logbuf_len

38 static size_t sdev_format_header(char *logbuf, size_t logbuf_len,  in sdev_format_header()  argument
44 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_format_header()
47 if (WARN_ON(off >= logbuf_len)) in sdev_format_header()
51 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_format_header()
61 size_t off = 0, logbuf_len; in sdev_prefix_printk() local
66 logbuf = scsi_log_reserve_buffer(&logbuf_len); in sdev_prefix_printk()
71 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_prefix_printk()
73 if (!WARN_ON(off >= logbuf_len)) { in sdev_prefix_printk()
75 off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); in sdev_prefix_printk()
88 size_t off = 0, logbuf_len; in scmd_printk() local
93 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scmd_printk()
96 off = sdev_format_header(logbuf, logbuf_len, scmd_name(scmd), in scmd_printk()
98 if (off < logbuf_len) { in scmd_printk()
100 off += vscnprintf(logbuf + off, logbuf_len - off, fmt, args); in scmd_printk()
157 size_t __scsi_format_command(char *logbuf, size_t logbuf_len, in __scsi_format_command() argument
163 off = scsi_format_opcode_name(logbuf, logbuf_len, cdb); in __scsi_format_command()
164 if (off >= logbuf_len) in __scsi_format_command()
171 if (off > logbuf_len - 3) in __scsi_format_command()
173 off += scnprintf(logbuf + off, logbuf_len - off, in __scsi_format_command()
184 size_t off, logbuf_len; in scsi_print_command() local
186 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_print_command()
190 off = sdev_format_header(logbuf, logbuf_len, in scsi_print_command()
192 if (off >= logbuf_len) in scsi_print_command()
194 off += scnprintf(logbuf + off, logbuf_len - off, "CDB: "); in scsi_print_command()
195 if (WARN_ON(off >= logbuf_len)) in scsi_print_command()
198 off += scsi_format_opcode_name(logbuf + off, logbuf_len - off, in scsi_print_command()
200 if (off >= logbuf_len) in scsi_print_command()
206 off += scnprintf(logbuf + off, logbuf_len - off, "\n"); in scsi_print_command()
211 off = sdev_format_header(logbuf, logbuf_len, in scsi_print_command()
214 if (!WARN_ON(off > logbuf_len - 58)) { in scsi_print_command()
215 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_command()
219 logbuf_len - off, false); in scsi_print_command()
226 if (!WARN_ON(off > logbuf_len - 49)) { in scsi_print_command()
227 off += scnprintf(logbuf + off, logbuf_len - off, " "); in scsi_print_command()
229 logbuf + off, logbuf_len - off, in scsi_print_command()
296 size_t logbuf_len; in scsi_log_dump_sense() local
299 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_log_dump_sense()
307 off = sdev_format_header(logbuf, logbuf_len, in scsi_log_dump_sense()
310 logbuf + off, logbuf_len - off, in scsi_log_dump_sense()
322 size_t off, logbuf_len; in scsi_log_print_sense_hdr() local
324 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_log_print_sense_hdr()
327 off = sdev_format_header(logbuf, logbuf_len, name, tag); in scsi_log_print_sense_hdr()
328 off += scsi_format_sense_hdr(logbuf + off, logbuf_len - off, sshdr); in scsi_log_print_sense_hdr()
332 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_log_print_sense_hdr()
335 off = sdev_format_header(logbuf, logbuf_len, name, tag); in scsi_log_print_sense_hdr()
336 off += scsi_format_extd_sense(logbuf + off, logbuf_len - off, in scsi_log_print_sense_hdr()
386 size_t off, logbuf_len; in scsi_print_result() local
391 logbuf = scsi_log_reserve_buffer(&logbuf_len); in scsi_print_result()
395 off = sdev_format_header(logbuf, logbuf_len, scmd_name(cmd), in scsi_print_result()
398 if (off >= logbuf_len) in scsi_print_result()
402 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
404 if (WARN_ON(off >= logbuf_len)) in scsi_print_result()
408 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
411 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
413 if (WARN_ON(off >= logbuf_len)) in scsi_print_result()
416 off += scnprintf(logbuf + off, logbuf_len - off, "Result: "); in scsi_print_result()
417 if (WARN_ON(off >= logbuf_len)) in scsi_print_result()
421 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
424 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
426 if (WARN_ON(off >= logbuf_len)) in scsi_print_result()
429 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()
432 off += scnprintf(logbuf + off, logbuf_len - off, in scsi_print_result()