[Midnightbsd-cvs] src [10707] trunk/usr.sbin/lmcconfig/lmcconfig.c: sync with freebsd
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jun 9 16:27:03 EDT 2018
Revision: 10707
http://svnweb.midnightbsd.org/src/?rev=10707
Author: laffer1
Date: 2018-06-09 16:27:03 -0400 (Sat, 09 Jun 2018)
Log Message:
-----------
sync with freebsd
Modified Paths:
--------------
trunk/usr.sbin/lmcconfig/Makefile
trunk/usr.sbin/lmcconfig/lmcconfig.8
trunk/usr.sbin/lmcconfig/lmcconfig.c
Property Changed:
----------------
trunk/usr.sbin/lmcconfig/lmcconfig.8
Modified: trunk/usr.sbin/lmcconfig/Makefile
===================================================================
--- trunk/usr.sbin/lmcconfig/Makefile 2018-06-09 20:26:03 UTC (rev 10706)
+++ trunk/usr.sbin/lmcconfig/Makefile 2018-06-09 20:27:03 UTC (rev 10707)
@@ -1,4 +1,5 @@
# $MidnightBSD$
+# $FreeBSD: stable/10/usr.sbin/lmcconfig/Makefile 216600 2010-12-20 19:08:15Z uqs $
PROG= lmcconfig
MAN= lmcconfig.8
Modified: trunk/usr.sbin/lmcconfig/lmcconfig.8
===================================================================
--- trunk/usr.sbin/lmcconfig/lmcconfig.8 2018-06-09 20:26:03 UTC (rev 10706)
+++ trunk/usr.sbin/lmcconfig/lmcconfig.8 2018-06-09 20:27:03 UTC (rev 10707)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
.\" Copyright (c) 2003 David Boggs. (boggs at boggs.palo-alto.ca.us)
.\" All rights reserved.
.\"
@@ -40,7 +41,7 @@
.\" this program; if not, write to the Free Software Foundation, Inc., 59
.\" Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.\"
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.sbin/lmcconfig/lmcconfig.8 233992 2012-04-07 09:05:30Z joel $
.\"
.Dd October 3, 2005
.Dt LMCCONFIG 8
@@ -186,7 +187,7 @@
.Ar number .
.Pp
.Bl -column "99" "payload" "inward thru drvrs/rcvrsxxx" "HSSI, SSI" -offset 1m -compact
-.It "1" Ta "none" Ta "default"
+.It "1" Ta "none" Ta "default" Ta \&
.It "2" Ta "payload" Ta "outward thru framer" Ta "T1E1. T3"
.It "3" Ta "line" Ta "outward thru line if" Ta "T1E1, T3, HSSIc"
.It "4" Ta "other" Ta "inward thru line if" Ta "T1E1, T3"
@@ -443,7 +444,7 @@
.It " 16" Ta "7.5 dB" Ta "FCC option B"
.It " 32" Ta "15 dB" Ta "FCC option C"
.It " 48" Ta "22.5 dB" Ta "final span"
-.It "255" Ta "auto-set based on cable length (default)"
+.It "255" Ta "auto-set based on cable length (default)" Ta \&
.El
.Pp
This is only applicable if the pulse shape is T1-CSU.
Property changes on: trunk/usr.sbin/lmcconfig/lmcconfig.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.sbin/lmcconfig/lmcconfig.c
===================================================================
--- trunk/usr.sbin/lmcconfig/lmcconfig.c 2018-06-09 20:26:03 UTC (rev 10706)
+++ trunk/usr.sbin/lmcconfig/lmcconfig.c 2018-06-09 20:27:03 UTC (rev 10707)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* First author: Michael Graff.
* Copyright (c) 1997-2000 Lan Media Corp. (www.lanmedia.com).
@@ -62,7 +63,7 @@
* cc -o lmcconfig lmcconfig.c
* Install the executable program in /usr/local/sbin/lmcconfig.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/usr.sbin/lmcconfig/lmcconfig.c 300279 2016-05-20 06:56:43Z truckman $
*/
#include <sys/param.h>
@@ -222,7 +223,7 @@
{
int error = 0;
- strncpy(iohdr->ifname, ifname, sizeof(iohdr->ifname));
+ strlcpy(iohdr->ifname, ifname, sizeof(iohdr->ifname));
iohdr->cookie = NGM_LMC_COOKIE;
iohdr->iohdr = iohdr;
@@ -1074,18 +1075,16 @@
static void
print_events(void)
{
- char *time;
- struct timeval tv;
- struct timezone tz;
+ const char *reset_time;
+ time_t now;
- gettimeofday(&tv, &tz);
- time = (char *)ctime((time_t *)&tv);
- printf("Current time:\t\t%s", time);
+ now = time(NULL);
+ printf("Current time:\t\t%s", ctime(&now));
if (status.cntrs.reset_time.tv_sec < 1000)
- time = "Never\n";
+ reset_time = "Never\n";
else
- time = (char *)ctime((time_t *)&status.cntrs.reset_time.tv_sec);
- printf("Cntrs reset:\t\t%s", time);
+ reset_time = ctime(&status.cntrs.reset_time.tv_sec);
+ printf("Cntrs reset:\t\t%s", reset_time);
if (status.cntrs.ibytes) printf("Rx bytes:\t\t%ju\n", (uintmax_t)status.cntrs.ibytes);
if (status.cntrs.obytes) printf("Tx bytes:\t\t%ju\n", (uintmax_t)status.cntrs.obytes);
More information about the Midnightbsd-cvs
mailing list