| 総合手引 | セクション 9 | English | オプション |
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/conf.h>
#include <sys/module.h> #include <sys/conf.h>static struct cdevsw foo_devsw = { ... };
static dev_t sdev;
static int foo_load(module_t mod, int cmd, void *arg) { int err = 0;
switch (cmd) { case MOD_LOAD: sdev = make_dev(&foo_devsw, 0, UID_ROOT, GID_WHEEL, 0600, "foo"); break; /* 成功 */
case MOD_UNLOAD: case MOD_SHUTDOWN: destroy_dev(sdev); break; /* 成功 */
default: err = EINVAL; break; }
return(err); }
DEV_MODULE(foo, foo_load, NULL);
| DEV_MODULE (9) | March 11, 2001 |
| 総合手引 | セクション 9 | English | オプション |
このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.
| “ | Our grievance is not just against Unix itself, but against the cult of Unix zealots who defend and nurture it. They take the heat, disease, and pestilence as givens, and, as ancient shamans did, display their wounds, some self-inflicted, as proof of their power and wizardry. We aim, through bluntness and humor, to show them that they pray to a tin god, and that science, not religion, is the path to useful and friendly technology. | ” |
| — The Unix Haters' handbook | ||