Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/null/null.c
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | null_write(struct cdev *dev __unused, struct uio *uio, int flags __unused) | ||||
return (0); | return (0); | ||||
} | } | ||||
/* ARGSUSED */ | /* ARGSUSED */ | ||||
static int | static int | ||||
null_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data __unused, | null_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data __unused, | ||||
int flags __unused, struct thread *td) | int flags __unused, struct thread *td) | ||||
{ | { | ||||
struct diocskerneldump_arg kda; | |||||
int error; | int error; | ||||
error = 0; | error = 0; | ||||
switch (cmd) { | switch (cmd) { | ||||
#ifdef COMPAT_FREEBSD11 | #ifdef COMPAT_FREEBSD11 | ||||
case DIOCSKERNELDUMP_FREEBSD11: | case DIOCSKERNELDUMP_FREEBSD11: | ||||
gone_in(13, "FreeBSD 11.x ABI compat"); | |||||
/* FALLTHROUGH */ | |||||
#endif | #endif | ||||
#ifdef COMPAT_FREEBSD12 | |||||
case DIOCSKERNELDUMP_FREEBSD12: | |||||
if (cmd == DIOCSKERNELDUMP_FREEBSD12) | |||||
gone_in(14, "FreeBSD 12.x ABI compat"); | |||||
/* FALLTHROUGH */ | |||||
#endif | |||||
case DIOCSKERNELDUMP: | case DIOCSKERNELDUMP: | ||||
error = clear_dumper(td); | bzero(&kda, sizeof(kda)); | ||||
kda.kda_index = KDA_REMOVE_ALL; | |||||
error = dumper_remove(NULL, &kda); | |||||
scottl: Will this do anything? My reading of remove_dumper() is that it might not. | |||||
Done Inline ActionsYes, it should clear out every registered dump configuration — NULL devname will match all configs (via devname wildcard in dumper_config_match()). If no dump configurations are registered, it does nothing (and that is expected). cem: Yes, it should clear out every registered dump configuration — NULL `devname` will match all… | |||||
break; | break; | ||||
case FIONBIO: | case FIONBIO: | ||||
break; | break; | ||||
case FIOASYNC: | case FIOASYNC: | ||||
if (*(int *)data != 0) | if (*(int *)data != 0) | ||||
error = EINVAL; | error = EINVAL; | ||||
break; | break; | ||||
default: | default: | ||||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |
Will this do anything? My reading of remove_dumper() is that it might not.