Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/null/null.c
Context not available. | |||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_compat.h" | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/conf.h> | #include <sys/conf.h> | ||||
Context not available. | |||||
error = 0; | error = 0; | ||||
switch (cmd) { | switch (cmd) { | ||||
#ifdef COMPAT_FREEBSD10 | |||||
case DIOCSKERNELDUMP_FREEBSD10: | |||||
delphij: Why do we need this? (Looks like they are doing the same thing of the new DIOCSKERNELDUMP?)… | |||||
#endif | |||||
case DIOCSKERNELDUMP: | case DIOCSKERNELDUMP: | ||||
error = set_dumper(NULL, NULL, td); | error = set_dumper(NULL, NULL, td, 0, NULL, 0, NULL); | ||||
break; | break; | ||||
case FIONBIO: | case FIONBIO: | ||||
Done Inline ActionsOr perhaps here we need to pass something in? (Looks like we don't). delphij: Or perhaps here we need to pass something in? (Looks like we don't). | |||||
Done Inline ActionsThis is here so that dumps can be disabled by "setting" them on /dev/null. (That is, there isn't a separate ioctl request to disable dumps, instead /dev/null is (ab)used as a cookie to disable them.) I think a FALLTHROUGH as you suggested is fine, but you can also do it even simpler as: #ifdef COMPAT_FREEBSD10 case DIOCSKERNELDUMPOLD: #endif case DIOCSKERNELDUMP: jhb: This is here so that dumps can be disabled by "setting" them on /dev/null. (That is, there… | |||||
Done Inline ActionsI like this one the most. pjd: I like this one the most. | |||||
break; | break; | ||||
Context not available. |
Why do we need this? (Looks like they are doing the same thing of the new DIOCSKERNELDUMP?) Can the two lines below be replaced with a comment like, /* FALLTHROUGH */?