[Midnightbsd-cvs] src [10975] trunk/include/protocols: leanup
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Jun 15 16:05:11 EDT 2018
Revision: 10975
http://svnweb.midnightbsd.org/src/?rev=10975
Author: laffer1
Date: 2018-06-15 16:05:10 -0400 (Fri, 15 Jun 2018)
Log Message:
-----------
leanup
Modified Paths:
--------------
trunk/include/protocols/Makefile
trunk/include/protocols/dumprestore.h
trunk/include/protocols/routed.h
trunk/include/protocols/rwhod.h
trunk/include/protocols/talkd.h
trunk/include/protocols/timed.h
Modified: trunk/include/protocols/Makefile
===================================================================
--- trunk/include/protocols/Makefile 2018-06-15 20:04:53 UTC (rev 10974)
+++ trunk/include/protocols/Makefile 2018-06-15 20:05:10 UTC (rev 10975)
@@ -1,4 +1,5 @@
# $MidnightBSD$
+# $FreeBSD: stable/10/include/protocols/Makefile 139103 2004-12-21 08:47:35Z ru $
NO_OBJ=
INCS= dumprestore.h routed.h rwhod.h talkd.h timed.h
Modified: trunk/include/protocols/dumprestore.h
===================================================================
--- trunk/include/protocols/dumprestore.h 2018-06-15 20:04:53 UTC (rev 10974)
+++ trunk/include/protocols/dumprestore.h 2018-06-15 20:05:10 UTC (rev 10975)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1980, 1993
* The Regents of the University of California. All rights reserved.
@@ -33,7 +34,7 @@
*
* @(#)dumprestore.h 8.2 (Berkeley) 1/21/94
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/include/protocols/dumprestore.h 235601 2012-05-18 10:01:31Z gleb $
*/
#ifndef _PROTOCOLS_DUMPRESTORE_H_
@@ -65,6 +66,15 @@
#endif
#define CHECKSUM (int)84446
+/*
+ * Since ino_t size is changing to 64-bits, yet we desire this structure to
+ * remain compatible with exiting dump formats, we do NOT use ino_t here,
+ * but rather define a 32-bit type in its place. At some point, it may be
+ * necessary to use some of the c_spare[] in order to fully support 64-bit
+ * inode numbers.
+ */
+typedef uint32_t dump_ino_t;
+
union u_spcl {
char dummy[TP_BSIZE];
struct s_spcl {
@@ -73,7 +83,7 @@
int32_t c_old_ddate; /* date of previous dump */
int32_t c_volume; /* dump volume number */
int32_t c_old_tapea; /* logical block of this record */
- ino_t c_inumber; /* number of inode */
+ dump_ino_t c_inumber; /* number of inode */
int32_t c_magic; /* magic number (see above) */
int32_t c_checksum; /* record checksum */
/*
Modified: trunk/include/protocols/routed.h
===================================================================
--- trunk/include/protocols/routed.h 2018-06-15 20:04:53 UTC (rev 10974)
+++ trunk/include/protocols/routed.h 2018-06-15 20:05:10 UTC (rev 10975)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -28,8 +29,8 @@
*
* @(#)routed.h 8.1 (Berkeley) 6/2/93
*
- * $MidnightBSD$
- * $Revision: 1.2 $
+ * $FreeBSD: stable/10/include/protocols/routed.h 203965 2010-02-16 19:46:46Z imp $
+ * $Revision: 2.26 $
*/
#ifndef _ROUTED_H_
Modified: trunk/include/protocols/rwhod.h
===================================================================
--- trunk/include/protocols/rwhod.h 2018-06-15 20:04:53 UTC (rev 10974)
+++ trunk/include/protocols/rwhod.h 2018-06-15 20:05:10 UTC (rev 10975)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -28,12 +29,14 @@
*
* @(#)rwhod.h 8.1 (Berkeley) 6/2/93
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/include/protocols/rwhod.h 250889 2013-05-21 21:50:11Z ed $
*/
#ifndef _PROTOCOLS_RWHOD_H_
#define _PROTOCOLS_RWHOD_H_
+#include <sys/_types.h>
+
/*
* rwho protocol packet format.
*/
@@ -40,7 +43,7 @@
struct outmp {
char out_line[8]; /* tty name */
char out_name[8]; /* user id */
- int32_t out_time; /* time on */
+ __int32_t out_time; /* time on */
};
struct whod {
Modified: trunk/include/protocols/talkd.h
===================================================================
--- trunk/include/protocols/talkd.h 2018-06-15 20:04:53 UTC (rev 10974)
+++ trunk/include/protocols/talkd.h 2018-06-15 20:05:10 UTC (rev 10975)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -28,7 +29,7 @@
*
* @(#)talkd.h 8.1 (Berkeley) 6/2/93
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/include/protocols/talkd.h 203965 2010-02-16 19:46:46Z imp $
*/
#ifndef _PROTOCOLS_TALKD_H_
Modified: trunk/include/protocols/timed.h
===================================================================
--- trunk/include/protocols/timed.h 2018-06-15 20:04:53 UTC (rev 10974)
+++ trunk/include/protocols/timed.h 2018-06-15 20:05:10 UTC (rev 10975)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -28,7 +29,7 @@
*
* @(#)timed.h 8.1 (Berkeley) 6/2/93
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/include/protocols/timed.h 249311 2013-04-09 16:16:34Z ed $
*/
#ifndef _PROTOCOLS_TIMED_H_
@@ -90,11 +91,13 @@
#define TSPTYPENUMBER 25
#ifdef TSPTYPES
-const char *tsptype[TSPTYPENUMBER] =
+static char const * const tsptype[] =
{ "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP",
"SLAVEUP", "ELECTION", "ACCEPT", "REFUSE", "CONFLICT", "RESOLVE", "QUIT",
"DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE", "MSITEREQ",
"TEST", "SETDATE", "SETDATEREQ", "LOOP" };
+_Static_assert(sizeof(tsptype) / sizeof(const char *) == TSPTYPENUMBER,
+ "Size of tsptype does not match TSPTYPENUMBER");
#endif
#endif /* !_TIMED_H_ */
More information about the Midnightbsd-cvs
mailing list