Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102058576
D41416.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D41416.diff
View Options
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -434,7 +434,7 @@
const char *, const char *, const char *, const char *, int);
static void fprintlog_write(struct filed *, struct iovlist *, int);
static void fprintlog_successive(struct filed *, int);
-static void init(int);
+static void init(bool);
static void logerror(const char *);
static void logmsg(int, const struct logtime *, const char *, const char *,
const char *, const char *, const char *, const char *, int);
@@ -2493,7 +2493,7 @@
* INIT -- Initialize syslogd from configuration table
*/
static void
-init(int signo)
+init(bool reload)
{
int i;
struct filed *f;
@@ -2507,7 +2507,7 @@
/*
* Load hostname (may have changed).
*/
- if (signo != 0)
+ if (reload)
(void)strlcpy(oldLocalHostName, LocalHostName,
sizeof(oldLocalHostName));
if (gethostname(LocalHostName, sizeof(LocalHostName)))
@@ -2651,9 +2651,9 @@
NULL, NULL, "restart", 0);
dprintf("syslogd: restarted\n");
/*
- * Log a change in hostname, but only on a restart.
+ * Log a change in hostname, but only on reload.
*/
- if (signo != 0 && strcmp(oldLocalHostName, LocalHostName) != 0) {
+ if (reload && strcmp(oldLocalHostName, LocalHostName) != 0) {
(void)snprintf(hostMsg, sizeof(hostMsg),
"hostname changed, \"%s\" to \"%s\"",
oldLocalHostName, LocalHostName);
@@ -2663,9 +2663,9 @@
}
/*
* Log the kernel boot file if we aren't going to use it as
- * the prefix, and if this is *not* a restart.
+ * the prefix, and if this is *not* a reload.
*/
- if (signo == 0 && !use_bootfile) {
+ if (!reload && !use_bootfile) {
(void)snprintf(bootfileMsg, sizeof(bootfileMsg),
"kernel boot file is %s", bootfile);
logmsg(LOG_KERN | LOG_INFO, NULL, LocalHostName, "syslogd",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 2:40 AM (20 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14525934
Default Alt Text
D41416.diff (1 KB)
Attached To
Mode
D41416: syslogd: Use boolean reload parameter for init()
Attached
Detach File
Event Timeline
Log In to Comment