Lines Matching defs:command
118 char *command = NULL; /* argument to -c */
138 command = optarg;
139 if (*command != '/') {
141 error("command must be a full pathname");
295 if (!sawaflag || !pmtag || !type || !command || (version < 0))
297 add_pm(pmtag, type, command, version, flags, count, script, comment);
405 * args: cmdname - the name command was invoked with
434 * command - command string to invoke port monitor
443 add_pm(tag, type, command, version, flags, count, script, comment)
446 char *command;
577 * isolate the command name, but remember it since strtok() trashes it
580 if (strlcpy(buf, command, sizeof (buf)) >= sizeof (buf)) {
583 error("command string too long");
586 (void) strtok(command, " \t");
589 * check out the command - let addition succeed if it doesn't exist (assume
593 if (access(command, 0) == 0) {
594 if (stat(command, &statbuf) < 0) {
596 (void) fprintf(stderr, "Could not stat <%s>\n", command);
602 (void) fprintf(stderr, "%s not executable\n", command);
608 (void) fprintf(stderr, "%s not a regular file\n", command);
614 (void) fprintf(stderr, "warning - %s does not exist\n", command);
741 struct admcmd cmd; /* command structure */
762 struct admcmd cmd; /* command structure */
783 struct admcmd cmd; /* command structure */
804 struct admcmd cmd; /* command structure */
826 struct admcmd cmd; /* command structure */
853 struct admcmd acmd; /* command structure */
862 char *cmd; /* returned command string */
893 cmd = getfield(&p, ':'); /* command */
1034 * openpipe - open up command pipe to SAC
1040 int fd; /* file descriptor associated with command pipe */
1054 error("unable to lock command pipe");
1061 * sendcmd - send a command to the SAC
1063 * args: ap - pointer to command to send
1065 * tag - tag of port monitor to which the command applies (may
1075 int fd; /* file descriptor of command pipe */
1085 * unlock the command pipe - not really necessary since we're about to close
1095 * checkresp - check the SAC's response to our command
1097 * args: fd - file descriptor of command pipe
1099 * tag - tag of port monitor that the command had been
1170 (void) fprintf(stderr, "Internal error - sent invalid command\n");