[Midnightbsd-cvs] src [11229] trunk/sbin/dump: sync with freebsd

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Jul 1 17:10:16 EDT 2018


Revision: 11229
          http://svnweb.midnightbsd.org/src/?rev=11229
Author:   laffer1
Date:     2018-07-01 17:10:15 -0400 (Sun, 01 Jul 2018)
Log Message:
-----------
sync with freebsd

Modified Paths:
--------------
    trunk/sbin/dump/Makefile
    trunk/sbin/dump/cache.c
    trunk/sbin/dump/dump.8
    trunk/sbin/dump/dump.h
    trunk/sbin/dump/dumprmt.c
    trunk/sbin/dump/itime.c
    trunk/sbin/dump/main.c
    trunk/sbin/dump/optr.c
    trunk/sbin/dump/pathnames.h
    trunk/sbin/dump/tape.c
    trunk/sbin/dump/traverse.c

Property Changed:
----------------
    trunk/sbin/dump/dump.8

Modified: trunk/sbin/dump/Makefile
===================================================================
--- trunk/sbin/dump/Makefile	2018-07-01 21:09:49 UTC (rev 11228)
+++ trunk/sbin/dump/Makefile	2018-07-01 21:10:15 UTC (rev 11229)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
-# $MidnightBSD$
+# $FreeBSD: stable/10/sbin/dump/Makefile 198236 2009-10-19 16:00:24Z ru $
 
 #	dump.h			header file
 #	itime.c			reads /etc/dumpdates

Modified: trunk/sbin/dump/cache.c
===================================================================
--- trunk/sbin/dump/cache.c	2018-07-01 21:09:49 UTC (rev 11228)
+++ trunk/sbin/dump/cache.c	2018-07-01 21:10:15 UTC (rev 11229)
@@ -1,9 +1,10 @@
+/* $MidnightBSD$ */
 /*
  * CACHE.C
  *
  *	Block cache for dump
  *
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sbin/dump/cache.c 109825 2003-01-25 19:06:30Z dillon $
  */
 
 #include <sys/param.h>

Modified: trunk/sbin/dump/dump.8
===================================================================
--- trunk/sbin/dump/dump.8	2018-07-01 21:09:49 UTC (rev 11228)
+++ trunk/sbin/dump/dump.8	2018-07-01 21:10:15 UTC (rev 11229)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1980, 1991, 1993
 .\"	 Regents of the University of California.
 .\" All rights reserved.
@@ -27,9 +28,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)dump.8	8.3 (Berkeley) 5/1/95
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/sbin/dump/dump.8 306980 2016-10-10 16:14:00Z sevan $
 .\"
-.Dd February 24, 2006
+.Dd October 3, 2016
 .Dt DUMP 8
 .Os
 .Sh NAME
@@ -51,16 +52,6 @@
 .Ar filesystem
 .Nm
 .Fl W | Fl w
-.Pp
-.Nm rdump
-is an alternate name for
-.Nm .
-.Pp
-.in \" XXX
-(The
-.Bx 4.3
-option syntax is implemented for backward compatibility, but
-is not documented here.)
 .Sh DESCRIPTION
 The
 .Nm
@@ -97,6 +88,14 @@
 (if that is in a standard entry in
 .Pa /etc/fstab ) .
 .Pp
+.Nm
+may also be invoked as
+.Nm rdump .
+The
+.Bx 4.3
+option syntax is implemented for backward compatibility, but
+is not documented here.
+.Pp
 The following options are supported by
 .Nm :
 .Bl -tag -width Ds
@@ -516,7 +515,7 @@
 A
 .Nm
 utility appeared in
-.At v6 .
+.At v4 .
 .Sh BUGS
 Fewer than 32 read errors on the file system are ignored, though all
 errors will generate a warning message.


Property changes on: trunk/sbin/dump/dump.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/sbin/dump/dump.h
===================================================================
--- trunk/sbin/dump/dump.h	2018-07-01 21:09:49 UTC (rev 11228)
+++ trunk/sbin/dump/dump.h	2018-07-01 21:10:15 UTC (rev 11229)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1980, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -28,7 +29,7 @@
  *
  *	@(#)dump.h	8.2 (Berkeley) 4/28/95
  *
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sbin/dump/dump.h 243665 2012-11-29 05:16:50Z eadler $
  */
 
 /*
@@ -121,7 +122,7 @@
 void	writerec(char *dp, int isspcl);
 
 void	Exit(int status) __dead2;
-void	dumpabort(int signo);
+void	dumpabort(int signo) __dead2;
 void	dump_getfstab(void);
 
 char	*rawname(char *cp);

Modified: trunk/sbin/dump/dumprmt.c
===================================================================
--- trunk/sbin/dump/dumprmt.c	2018-07-01 21:09:49 UTC (rev 11228)
+++ trunk/sbin/dump/dumprmt.c	2018-07-01 21:10:15 UTC (rev 11229)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1980, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -32,7 +33,7 @@
 static char sccsid[] = "@(#)dumprmt.c	8.3 (Berkeley) 4/28/95";
 #endif
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/sbin/dump/dumprmt.c 128085 2004-04-10 02:22:35Z bde $";
 #endif /* not lint */
 
 #include <sys/param.h>

Modified: trunk/sbin/dump/itime.c
===================================================================
--- trunk/sbin/dump/itime.c	2018-07-01 21:09:49 UTC (rev 11228)
+++ trunk/sbin/dump/itime.c	2018-07-01 21:10:15 UTC (rev 11229)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1980, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -32,7 +33,7 @@
 static char sccsid[] = "@(#)itime.c	8.1 (Berkeley) 6/5/93";
 #endif
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/sbin/dump/itime.c 226520 2011-10-18 18:42:26Z mckusick $";
 #endif /* not lint */
 
 #include <sys/param.h>

Modified: trunk/sbin/dump/main.c
===================================================================
--- trunk/sbin/dump/main.c	2018-07-01 21:09:49 UTC (rev 11228)
+++ trunk/sbin/dump/main.c	2018-07-01 21:10:15 UTC (rev 11229)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -38,7 +39,7 @@
 static char sccsid[] = "@(#)main.c	8.6 (Berkeley) 5/1/95";
 #endif
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/sbin/dump/main.c 229403 2012-01-03 18:51:58Z ed $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -290,7 +291,7 @@
 		tape = strchr(host, ':');
 		*tape++ = '\0';
 #ifdef RDUMP
-		if (index(tape, '\n')) {
+		if (strchr(tape, '\n')) {
 		    (void)fprintf(stderr, "invalid characters in tape\n");
 		    exit(X_STARTUP);
 		}

Modified: trunk/sbin/dump/optr.c
===================================================================
--- trunk/sbin/dump/optr.c	2018-07-01 21:09:49 UTC (rev 11228)
+++ trunk/sbin/dump/optr.c	2018-07-01 21:10:15 UTC (rev 11229)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1980, 1988, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -32,7 +33,7 @@
 static char sccsid[] = "@(#)optr.c	8.2 (Berkeley) 1/6/94";
 #endif
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/sbin/dump/optr.c 217769 2011-01-24 06:17:05Z mckusick $";
 #endif /* not lint */
 
 #include <sys/param.h>

Modified: trunk/sbin/dump/pathnames.h
===================================================================
--- trunk/sbin/dump/pathnames.h	2018-07-01 21:09:49 UTC (rev 11228)
+++ trunk/sbin/dump/pathnames.h	2018-07-01 21:10:15 UTC (rev 11229)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -27,7 +28,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)pathnames.h	8.1 (Berkeley) 6/5/93
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sbin/dump/pathnames.h 128073 2004-04-09 19:58:40Z markm $
  */
 
 #include <paths.h>

Modified: trunk/sbin/dump/tape.c
===================================================================
--- trunk/sbin/dump/tape.c	2018-07-01 21:09:49 UTC (rev 11228)
+++ trunk/sbin/dump/tape.c	2018-07-01 21:10:15 UTC (rev 11229)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1980, 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -32,7 +33,7 @@
 static char sccsid[] = "@(#)tape.c	8.4 (Berkeley) 5/1/95";
 #endif
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/sbin/dump/tape.c 217769 2011-01-24 06:17:05Z mckusick $";
 #endif /* not lint */
 
 #include <sys/param.h>

Modified: trunk/sbin/dump/traverse.c
===================================================================
--- trunk/sbin/dump/traverse.c	2018-07-01 21:09:49 UTC (rev 11228)
+++ trunk/sbin/dump/traverse.c	2018-07-01 21:10:15 UTC (rev 11229)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1980, 1988, 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -32,7 +33,7 @@
 static char sccsid[] = "@(#)traverse.c	8.7 (Berkeley) 6/15/95";
 #endif
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/sbin/dump/traverse.c 272867 2014-10-09 23:43:13Z hrs $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -197,8 +198,8 @@
 			    (mode & IFMT) == 0)
 				continue;
 			if (ino >= maxino) {
-				msg("Skipping inode %d >= maxino %d\n",
-				    ino, maxino);
+				msg("Skipping inode %ju >= maxino %ju\n",
+				    (uintmax_t)ino, (uintmax_t)maxino);
 				continue;
 			}
 			/*
@@ -400,7 +401,8 @@
 	for (loc = 0; loc < size; ) {
 		dp = (struct direct *)(dblk + loc);
 		if (dp->d_reclen == 0) {
-			msg("corrupted directory, inumber %d\n", ino);
+			msg("corrupted directory, inumber %ju\n",
+			    (uintmax_t)ino);
 			break;
 		}
 		loc += dp->d_reclen;
@@ -407,8 +409,8 @@
 		if (dp->d_ino == 0)
 			continue;
 		if (dp->d_ino >= maxino) {
-			msg("corrupted directory entry, d_ino %d >= %d\n",
-			    dp->d_ino, maxino);
+			msg("corrupted directory entry, d_ino %ju >= %ju\n",
+			    (uintmax_t)dp->d_ino, (uintmax_t)maxino);
 			break;
 		}
 		if (dp->d_name[0] == '.') {
@@ -672,7 +674,12 @@
 	 */
 	blks = howmany(frags * sblock->fs_fsize, TP_BSIZE);
 	if (last) {
-		resid = howmany(fragoff(sblock, dp->dp2.di_size), TP_BSIZE);
+		if (writingextdata)
+			resid = howmany(fragoff(sblock, spcl.c_extsize),
+			    TP_BSIZE);
+		else
+			resid = howmany(fragoff(sblock, dp->dp2.di_size),
+			    TP_BSIZE);
 		if (resid > 0)
 			blks -= howmany(sblock->fs_fsize, TP_BSIZE) - resid;
 	}



More information about the Midnightbsd-cvs mailing list