Lines Matching full:off
41 size_t off = 0; in sdev_format_header() local
44 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_format_header()
47 if (WARN_ON(off >= logbuf_len)) in sdev_format_header()
48 return off; in sdev_format_header()
51 off += scnprintf(logbuf + off, logbuf_len - off, in sdev_format_header()
53 return off; in sdev_format_header()
61 size_t off = 0, logbuf_len; in sdev_prefix_printk() local
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
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()
113 size_t off; in scsi_format_opcode_name() local
120 off = scnprintf(buffer, buf_len, in scsi_format_opcode_name()
123 return off; in scsi_format_opcode_name()
131 off = scnprintf(buffer, buf_len, "%s", cdb_name); in scsi_format_opcode_name()
133 off = scnprintf(buffer, buf_len, "opcode=0x%x", cdb0); in scsi_format_opcode_name()
134 if (WARN_ON(off >= buf_len)) in scsi_format_opcode_name()
135 return off; in scsi_format_opcode_name()
137 off += scnprintf(buffer + off, buf_len - off, in scsi_format_opcode_name()
140 off += scnprintf(buffer + off, buf_len - off, in scsi_format_opcode_name()
145 off = scnprintf(buffer, buf_len, "%s", sa_name); in scsi_format_opcode_name()
147 off = scnprintf(buffer, buf_len, "%s, sa=0x%x", in scsi_format_opcode_name()
150 off = scnprintf(buffer, buf_len, in scsi_format_opcode_name()
153 WARN_ON(off >= buf_len); in scsi_format_opcode_name()
154 return off; in scsi_format_opcode_name()
161 size_t off; in __scsi_format_command() local
163 off = scsi_format_opcode_name(logbuf, logbuf_len, cdb); in __scsi_format_command()
164 if (off >= logbuf_len) in __scsi_format_command()
165 return off; 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()
176 return off; in __scsi_format_command()
184 size_t off, logbuf_len; in scsi_print_command() local
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()
218 16, 1, logbuf + 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()
243 size_t off = 0; in scsi_format_extd_sense() local
249 off = scnprintf(buffer, buf_len, "Add. Sense: %s", in scsi_format_extd_sense()
252 off += scnprintf(buffer + off, buf_len - off, in scsi_format_extd_sense()
256 off = scnprintf(buffer, buf_len, "<<vendor>>"); in scsi_format_extd_sense()
257 off += scnprintf(buffer + off, buf_len - off, in scsi_format_extd_sense()
260 off += scnprintf(buffer + off, buf_len - off, in scsi_format_extd_sense()
262 off += scnprintf(buffer + off, buf_len - off, in scsi_format_extd_sense()
265 return off; in scsi_format_extd_sense()
273 size_t off; in scsi_format_sense_hdr() local
275 off = scnprintf(buffer, buf_len, "Sense Key : "); in scsi_format_sense_hdr()
278 off += scnprintf(buffer + off, buf_len - off, in scsi_format_sense_hdr()
281 off += scnprintf(buffer + off, buf_len - off, in scsi_format_sense_hdr()
283 off += scnprintf(buffer + off, buf_len - off, in scsi_format_sense_hdr()
287 off += scnprintf(buffer + off, buf_len - off, "[descriptor] "); in scsi_format_sense_hdr()
288 return off; in scsi_format_sense_hdr()
305 size_t off; in scsi_log_dump_sense() local
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
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()
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
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()