netdump: Fix 11 compatibility DIOCSKERNELDUMP ioctl
The logic was present for the 11 version of the DIOCSKERNELDUMP ioctl, but had not been updated for the 12 ABI. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D19980
This commit is contained in:
parent
3ea680f19f
commit
926ea6e16b
@ -1144,13 +1144,25 @@ netdump_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr,
|
||||
|
||||
error = 0;
|
||||
switch (cmd) {
|
||||
case DIOCSKERNELDUMP:
|
||||
#ifdef COMPAT_FREEBSD11
|
||||
case DIOCSKERNELDUMP_FREEBSD11:
|
||||
u = *(u_int *)addr;
|
||||
if (u != 0) {
|
||||
error = ENXIO;
|
||||
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) {
|
||||
nd_enabled = 0;
|
||||
netdump_mbuf_drain();
|
||||
|
Loading…
Reference in New Issue
Block a user