Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/netdump/netdump_client.c
Show First 20 Lines • Show All 1,134 Lines • ▼ Show 20 Lines | |||||
netdump_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr, | netdump_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr, | ||||
int flags __unused, struct thread *td) | int flags __unused, struct thread *td) | ||||
{ | { | ||||
struct diocskerneldump_arg *kda; | struct diocskerneldump_arg *kda; | ||||
struct dumperinfo dumper; | struct dumperinfo dumper; | ||||
struct netdump_conf *conf; | struct netdump_conf *conf; | ||||
uint8_t *encryptedkey; | uint8_t *encryptedkey; | ||||
int error; | int error; | ||||
u_int u; | u_int u; | ||||
iz-rpi03_hs-karlsruhe.de: Use `#ifdef COMPAT_FREEBSD11` here as well. | |||||
cemAuthorUnsubmitted Done Inline ActionsThanks for the catch! cem: Thanks for the catch! | |||||
error = 0; | error = 0; | ||||
switch (cmd) { | switch (cmd) { | ||||
case DIOCSKERNELDUMP: | #ifdef COMPAT_FREEBSD11 | ||||
case DIOCSKERNELDUMP_FREEBSD11: | |||||
u = *(u_int *)addr; | u = *(u_int *)addr; | ||||
if (u != 0) { | if (u != 0) { | ||||
error = ENXIO; | error = ENXIO; | ||||
break; | break; | ||||
} | } | ||||
if (nd_enabled) { | |||||
nd_enabled = 0; | |||||
netdump_mbuf_drain(); | |||||
} | |||||
break; | |||||
#endif | |||||
case DIOCSKERNELDUMP: | |||||
kda = (void *)addr; | |||||
if (kda->kda_enable != 0) { | |||||
error = ENXIO; | |||||
break; | |||||
} | |||||
if (nd_enabled) { | if (nd_enabled) { | ||||
nd_enabled = 0; | nd_enabled = 0; | ||||
netdump_mbuf_drain(); | netdump_mbuf_drain(); | ||||
} | } | ||||
break; | break; | ||||
case NETDUMPGCONF: | case NETDUMPGCONF: | ||||
conf = (struct netdump_conf *)addr; | conf = (struct netdump_conf *)addr; | ||||
if (!nd_enabled) { | if (!nd_enabled) { | ||||
▲ Show 20 Lines • Show All 148 Lines • Show Last 20 Lines |
Use #ifdef COMPAT_FREEBSD11 here as well.