[Midnightbsd-cvs] src [11216] trunk/sbin/fsirand/fsirand.c: sync fsirand with freebsd
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Jul 1 16:51:38 EDT 2018
Revision: 11216
http://svnweb.midnightbsd.org/src/?rev=11216
Author: laffer1
Date: 2018-07-01 16:51:37 -0400 (Sun, 01 Jul 2018)
Log Message:
-----------
sync fsirand with freebsd
Modified Paths:
--------------
trunk/sbin/fsirand/Makefile
trunk/sbin/fsirand/fsirand.8
trunk/sbin/fsirand/fsirand.c
Property Changed:
----------------
trunk/sbin/fsirand/fsirand.8
Modified: trunk/sbin/fsirand/Makefile
===================================================================
--- trunk/sbin/fsirand/Makefile 2018-07-01 20:51:12 UTC (rev 11215)
+++ trunk/sbin/fsirand/Makefile 2018-07-01 20:51:37 UTC (rev 11216)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
# $OpenBSD: Makefile,v 1.1 1997/01/26 02:23:20 millert Exp $
-# $MidnightBSD$
+# $FreeBSD: stable/10/sbin/fsirand/Makefile 208074 2010-05-14 14:26:49Z uqs $
PROG= fsirand
MAN= fsirand.8
Modified: trunk/sbin/fsirand/fsirand.8
===================================================================
--- trunk/sbin/fsirand/fsirand.8 2018-07-01 20:51:12 UTC (rev 11215)
+++ trunk/sbin/fsirand/fsirand.8 2018-07-01 20:51:37 UTC (rev 11216)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
.\" Copyright (c) 1997 Todd C. Miller <Todd.Miller at courtesan.com>
.\" All rights reserved.
.\"
@@ -27,7 +28,7 @@
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $OpenBSD: fsirand.8,v 1.6 1997/02/23 03:58:26 millert Exp $
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/sbin/fsirand/fsirand.8 307403 2016-10-16 22:02:50Z sevan $
.\"
.Dd January 25, 1997
.Dt FSIRAND 8
@@ -107,7 +108,7 @@
version first appeared in
.Fx 2.2.5 .
.Sh AUTHORS
-.An Todd C. Miller Aq Todd.Miller at courtesan.com
+.An Todd C. Miller Aq Mt Todd.Miller at courtesan.com
.Sh CAVEATS
Since
.Nm
Property changes on: trunk/sbin/fsirand/fsirand.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/sbin/fsirand/fsirand.c
===================================================================
--- trunk/sbin/fsirand/fsirand.c 2018-07-01 20:51:12 UTC (rev 11215)
+++ trunk/sbin/fsirand/fsirand.c 2018-07-01 20:51:37 UTC (rev 11216)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $OpenBSD: fsirand.c,v 1.9 1997/02/28 00:46:33 millert Exp $ */
/*
@@ -32,11 +33,10 @@
#ifndef lint
static const char rcsid[] =
- "$MidnightBSD$";
+ "$FreeBSD: stable/10/sbin/fsirand/fsirand.c 322860 2017-08-24 21:44:23Z mckusick $";
#endif /* not lint */
#include <sys/param.h>
-#include <sys/disklabel.h>
#include <sys/resource.h>
#include <ufs/ufs/dinode.h>
@@ -60,7 +60,7 @@
*/
static int sblock_try[] = SBLOCKSEARCH;
-int printonly = 0, force = 0, ignorelabel = 0;
+static int printonly = 0, force = 0, ignorelabel = 0;
int
main(int argc, char *argv[])
@@ -120,7 +120,6 @@
char sbuf[SBLOCKSIZE], sbuftmp[SBLOCKSIZE];
int i, devfd, n, cg;
u_int32_t bsize = DEV_BSIZE;
- struct disklabel label;
if ((devfd = open(device, printonly ? O_RDONLY : O_RDWR)) < 0) {
warn("can't open %s", device);
@@ -127,15 +126,6 @@
return (1);
}
- /* Get block size (usually 512) from disklabel if possible */
- if (!ignorelabel) {
- if (ioctl(devfd, DIOCGDINFO, &label) < 0)
- warn("can't read disklabel, using sector size of %d",
- bsize);
- else
- bsize = label.d_secsize;
- }
-
dp1 = NULL;
dp2 = NULL;
@@ -274,8 +264,8 @@
dp2 = &((struct ufs2_dinode *)inodebuf)[n];
if (inumber >= ROOTINO) {
if (printonly)
- (void)printf("ino %d gen %08x\n",
- inumber,
+ (void)printf("ino %ju gen %08x\n",
+ (uintmax_t)inumber,
sblock->fs_magic == FS_UFS1_MAGIC ?
dp1->di_gen : dp2->di_gen);
else if (sblock->fs_magic == FS_UFS1_MAGIC)
More information about the Midnightbsd-cvs
mailing list