mirror of
https://github.com/opnsense/src.git
synced 2026-06-17 04:29:12 -04:00
kdump: Print splice structures
MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Stormshield
This commit is contained in:
parent
051a2132f4
commit
b76961e3a2
2 changed files with 16 additions and 0 deletions
BIN
lib/libsysdecode/ktrace.out
Normal file
BIN
lib/libsysdecode/ktrace.out
Normal file
Binary file not shown.
|
|
@ -105,6 +105,7 @@ void ktruser(int, void *);
|
|||
void ktrcaprights(cap_rights_t *);
|
||||
void ktritimerval(struct itimerval *it);
|
||||
void ktrsockaddr(struct sockaddr *);
|
||||
void ktrsplice(struct splice *);
|
||||
void ktrstat(struct stat *);
|
||||
void ktrstruct(char *, size_t);
|
||||
void ktrcapfail(struct ktr_cap_fail *);
|
||||
|
|
@ -1923,6 +1924,14 @@ ktrsockaddr(struct sockaddr *sa)
|
|||
printf(" }\n");
|
||||
}
|
||||
|
||||
void
|
||||
ktrsplice(struct splice *sp)
|
||||
{
|
||||
printf("struct splice { fd=%d, max=%#jx, idle=%jd.%06jd }\n",
|
||||
sp->sp_fd, (uintmax_t)sp->sp_max, (intmax_t)sp->sp_idle.tv_sec,
|
||||
(intmax_t)sp->sp_idle.tv_usec);
|
||||
}
|
||||
|
||||
void
|
||||
ktrstat(struct stat *statp)
|
||||
{
|
||||
|
|
@ -2111,6 +2120,13 @@ ktrstruct(char *buf, size_t buflen)
|
|||
memcpy(set, data, datalen);
|
||||
ktrbitset(name, set, datalen);
|
||||
free(set);
|
||||
} else if (strcmp(name, "splice") == 0) {
|
||||
struct splice sp;
|
||||
|
||||
if (datalen != sizeof(sp))
|
||||
goto invalid;
|
||||
memcpy(&sp, data, datalen);
|
||||
ktrsplice(&sp);
|
||||
} else {
|
||||
#ifdef SYSDECODE_HAVE_LINUX
|
||||
if (ktrstruct_linux(name, data, datalen) == false)
|
||||
|
|
|
|||
Loading…
Reference in a new issue