char *server;
char *port;
int socket_type;
- void (*syslogfp)(struct logger_ctl *ctl, char *msg);
+ void (*syslogfp)(const struct logger_ctl *ctl, const char *msg);
unsigned int
prio_prefix:1, /* read priority from intput */
pid:1, /* print PID, or PPID if it is enabled as well*/
return end + 1;
}
-static int decode(char *name, CODE *codetab)
+static int decode(const char *name, CODE *codetab)
{
register CODE *c;
}
#endif
-static char *xgetlogin()
+static char *xgetlogin(void)
{
char *cp;
struct passwd *pw;
return cp;
}
-static pid_t get_process_id(struct logger_ctl *ctl)
+static pid_t get_process_id(const struct logger_ctl *ctl)
{
pid_t id = 0;
return id;
}
-static void syslog_rfc3164(struct logger_ctl *ctl, char *msg)
+static void syslog_rfc3164(const struct logger_ctl *ctl, const char *msg)
{
char *buf, pid[30], *cp, *tp, *hostname, *dot;
time_t now;
free(buf);
}
-static void syslog_rfc5424(struct logger_ctl *ctl, char *msg)
+static void syslog_rfc5424(const struct logger_ctl *ctl, const char *msg)
{
char *buf, *tag = NULL, *hostname = NULL;
char pid[32], time[64], timeq[80];
}
}
-static void syslog_local(struct logger_ctl *ctl, char *msg)
+static void syslog_local(const struct logger_ctl *ctl, const char *msg)
{
char *buf, *tag;
char time[32], pid[32];
ctl->syslogfp = syslog_local;
}
-static void logger_command_line(struct logger_ctl *ctl, char **argv)
+static void logger_command_line(const struct logger_ctl *ctl, char **argv)
{
char buf[4096];
char *p = buf;
}
}
-static void logger_close(struct logger_ctl *ctl)
+static void logger_close(const struct logger_ctl *ctl)
{
if (close(ctl->fd) != 0)
err(EXIT_FAILURE, _("close failed"));