Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/syslogd/syslogd_cap.c
| Show All 39 Lines | |||||
| /* This is where libcasper receives commands via nvlist. */ | /* This is where libcasper receives commands via nvlist. */ | ||||
| static int | static int | ||||
| casper_command(const char *cmd, const nvlist_t *limits __unused, | casper_command(const char *cmd, const nvlist_t *limits __unused, | ||||
| nvlist_t *nvlin, nvlist_t *nvlout) | nvlist_t *nvlin, nvlist_t *nvlout) | ||||
| { | { | ||||
| int error = EINVAL; | int error = EINVAL; | ||||
| if (strcmp(cmd, "readconfigfile") == 0) | if (strcmp(cmd, "p_open") == 0) | ||||
| error = casper_p_open(nvlin, nvlout); | |||||
| else if (strcmp(cmd, "readconfigfile") == 0) | |||||
| error = casper_readconfigfile(nvlin, nvlout); | error = casper_readconfigfile(nvlin, nvlout); | ||||
| else if (strcmp(cmd, "ttymsg") == 0) | |||||
| error = casper_ttymsg(nvlin, nvlout); | |||||
| else if (strcmp(cmd, "wallmsg") == 0) | |||||
| error = casper_wallmsg(nvlin); | |||||
| return (error); | return (error); | ||||
| } | } | ||||
| CREATE_SERVICE("syslogd.casper", NULL, casper_command, CASPER_SERVICE_STDIO); | CREATE_SERVICE("syslogd.casper", NULL, casper_command, CASPER_SERVICE_STDIO); | ||||