[Midnightbsd-cvs] src [11495] trunk/usr.bin/logger/logger.c: make things static
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jul 7 13:33:52 EDT 2018
Revision: 11495
http://svnweb.midnightbsd.org/src/?rev=11495
Author: laffer1
Date: 2018-07-07 13:33:51 -0400 (Sat, 07 Jul 2018)
Log Message:
-----------
make things static
Modified Paths:
--------------
trunk/usr.bin/logger/Makefile
trunk/usr.bin/logger/logger.1
trunk/usr.bin/logger/logger.c
Property Changed:
----------------
trunk/usr.bin/logger/logger.1
Modified: trunk/usr.bin/logger/Makefile
===================================================================
--- trunk/usr.bin/logger/Makefile 2018-07-07 17:33:06 UTC (rev 11494)
+++ trunk/usr.bin/logger/Makefile 2018-07-07 17:33:51 UTC (rev 11495)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
# @(#)Makefile 8.1 (Berkeley) 6/6/93
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/logger/Makefile 201386 2010-01-02 10:27:05Z ed $
.include <bsd.own.mk>
Modified: trunk/usr.bin/logger/logger.1
===================================================================
--- trunk/usr.bin/logger/logger.1 2018-07-07 17:33:06 UTC (rev 11494)
+++ trunk/usr.bin/logger/logger.1 2018-07-07 17:33:51 UTC (rev 11495)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
.\" Copyright (c) 1983, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -26,9 +27,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)logger.1 8.1 (Berkeley) 6/6/93
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.bin/logger/logger.1 280977 2015-04-02 02:14:58Z wblock $
.\"
-.Dd August 2, 2006
+.Dd March 21, 2015
.Dt LOGGER 1
.Os
.Sh NAME
@@ -74,7 +75,8 @@
.It Fl s
Log the message to standard error, as well as the system log.
.It Fl f Ar file
-Log the specified file.
+Read the contents of the specified file into syslog.
+This option is ignored when a message is also specified.
.It Fl h Ar host
Send the message to the remote system
.Ar host
Property changes on: trunk/usr.bin/logger/logger.1
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.bin/logger/logger.c
===================================================================
--- trunk/usr.bin/logger/logger.c 2018-07-07 17:33:06 UTC (rev 11494)
+++ trunk/usr.bin/logger/logger.c 2018-07-07 17:33:51 UTC (rev 11495)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -40,7 +41,7 @@
#endif
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/logger/logger.c 241736 2012-10-19 14:29:03Z ed $");
#include <sys/types.h>
#include <sys/socket.h>
@@ -57,8 +58,8 @@
#define SYSLOG_NAMES
#include <syslog.h>
-int decode(char *, CODE *);
-int pencode(char *);
+static int decode(char *, const CODE *);
+static int pencode(char *);
static void logmessage(int, const char *, const char *, const char *,
const char *);
static void usage(void);
@@ -70,11 +71,11 @@
};
#ifdef INET6
-int family = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both) */
+static int family = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both) */
#else
-int family = PF_INET; /* protocol family (IPv4 only) */
+static int family = PF_INET; /* protocol family (IPv4 only) */
#endif
-int send_to_all = 0; /* send message to all IPv4/IPv6 addresses */
+static int send_to_all = 0; /* send message to all IPv4/IPv6 addresses */
/*
* logger -- read and log utility
@@ -176,7 +177,7 @@
/*
* Send the message to syslog, either on the local host, or on a remote host
*/
-void
+static void
logmessage(int pri, const char *tag, const char *host, const char *svcname,
const char *buf)
{
@@ -246,7 +247,7 @@
/*
* Decode a symbolic name to a numeric value
*/
-int
+static int
pencode(char *s)
{
char *save;
@@ -270,10 +271,10 @@
return ((lev & LOG_PRIMASK) | (fac & LOG_FACMASK));
}
-int
-decode(char *name, CODE *codetab)
+static int
+decode(char *name, const CODE *codetab)
{
- CODE *c;
+ const CODE *c;
if (isdigit(*name))
return (atoi(name));
More information about the Midnightbsd-cvs
mailing list