summaryrefslogtreecommitdiffstats
path: root/usr.sbin/newsyslog/newsyslog.c
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2013-01-27 06:03:57 +0000
committermarkj <markj@FreeBSD.org>2013-01-27 06:03:57 +0000
commitd68a3343d31b1149ae1176d0f0b5f8c92408461a (patch)
treef9e64734085f6f60cf686c79113011195a073d77 /usr.sbin/newsyslog/newsyslog.c
parent6491a8b5991985e7ef0979e248b1f54555b5e997 (diff)
downloadFreeBSD-src-d68a3343d31b1149ae1176d0f0b5f8c92408461a.zip
FreeBSD-src-d68a3343d31b1149ae1176d0f0b5f8c92408461a.tar.gz
Rename the run_cmd field to sw_runcmd to make it consistent with the
other fields in struct sigwork_entry. Approved by: rstone (co-mentor) MFC after: 1 week
Diffstat (limited to 'usr.sbin/newsyslog/newsyslog.c')
-rw-r--r--usr.sbin/newsyslog/newsyslog.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c
index dd48dfe..d0ef3d3 100644
--- a/usr.sbin/newsyslog/newsyslog.c
+++ b/usr.sbin/newsyslog/newsyslog.c
@@ -179,7 +179,7 @@ struct sigwork_entry {
int sw_pidok; /* true if pid value is valid */
pid_t sw_pid; /* the process id from the PID file */
const char *sw_pidtype; /* "daemon" or "process group" */
- int run_cmd; /* run command or send PID to signal */
+ int sw_runcmd; /* run command or send PID to signal */
char sw_fname[1]; /* file the PID was read from or shell cmd */
};
@@ -1866,7 +1866,7 @@ do_sigwork(struct sigwork_entry *swork)
int kres, secs;
char *tmp;
- if (swork->run_cmd == 0 && (!(swork->sw_pidok) || swork->sw_pid == 0))
+ if (swork->sw_runcmd == 0 && (!(swork->sw_pidok) || swork->sw_pid == 0))
return; /* no work to do... */
/*
@@ -1900,7 +1900,7 @@ do_sigwork(struct sigwork_entry *swork)
}
if (noaction) {
- if (swork->run_cmd)
+ if (swork->sw_runcmd)
printf("\tsh -c '%s %d'\n", swork->sw_fname,
swork->sw_signum);
else {
@@ -1912,7 +1912,7 @@ do_sigwork(struct sigwork_entry *swork)
return;
}
- if (swork->run_cmd) {
+ if (swork->sw_runcmd) {
asprintf(&tmp, "%s %d", swork->sw_fname, swork->sw_signum);
if (tmp == NULL) {
warn("can't allocate memory to run %s",
@@ -1988,7 +1988,7 @@ do_zipwork(struct zipwork_entry *zwork)
else
pgm_name++;
- if (zwork->zw_swork != NULL && zwork->zw_swork->run_cmd == 0 &&
+ if (zwork->zw_swork != NULL && zwork->zw_swork->sw_runcmd == 0 &&
zwork->zw_swork->sw_pidok <= 0) {
warnx(
"log %s not compressed because daemon(s) not notified",
@@ -2080,12 +2080,12 @@ save_sigwork(const struct conf_entry *ent)
tmpsiz = sizeof(struct sigwork_entry) + strlen(ent->pid_cmd_file) + 1;
stmp = malloc(tmpsiz);
- stmp->run_cmd = 0;
+ stmp->sw_runcmd = 0;
/* If this is a command to run we just set the flag and run command */
if (ent->flags & CE_PID2CMD) {
stmp->sw_pid = -1;
stmp->sw_pidok = 0;
- stmp->run_cmd = 1;
+ stmp->sw_runcmd = 1;
} else {
set_swpid(stmp, ent);
}
OpenPOWER on IntegriCloud