Module Name:    src
Committed By:   martin
Date:           Sat May 13 12:13:54 UTC 2023

Modified Files:
        src/sbin/fsck_ffs [netbsd-10]: fsck.h inode.c pass4.c utilities.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #162):

        sbin/fsck_ffs/inode.c: revision 1.74
        sbin/fsck_ffs/utilities.c: revision 1.68
        sbin/fsck_ffs/fsck.h: revision 1.57
        sbin/fsck_ffs/pass4.c: revision 1.30

catch up with sign changes in the fs.h


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.56.2.1 src/sbin/fsck_ffs/fsck.h
cvs rdiff -u -r1.73 -r1.73.6.1 src/sbin/fsck_ffs/inode.c
cvs rdiff -u -r1.28.38.1 -r1.28.38.2 src/sbin/fsck_ffs/pass4.c
cvs rdiff -u -r1.67 -r1.67.2.1 src/sbin/fsck_ffs/utilities.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsck_ffs/fsck.h
diff -u src/sbin/fsck_ffs/fsck.h:1.56 src/sbin/fsck_ffs/fsck.h:1.56.2.1
--- src/sbin/fsck_ffs/fsck.h:1.56	Thu Nov 17 06:40:38 2022
+++ src/sbin/fsck_ffs/fsck.h	Sat May 13 12:13:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsck.h,v 1.56 2022/11/17 06:40:38 chs Exp $	*/
+/*	$NetBSD: fsck.h,v 1.56.2.1 2023/05/13 12:13:54 martin Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -97,7 +97,7 @@ struct inostat {
  * which are described by the following structure.
  */
 extern struct inostatlist {
-	long    il_numalloced;  /* number of inodes allocated in this cg */
+	size_t  il_numalloced;  /* number of inodes allocated in this cg */
 	struct inostat *il_stat;/* inostat info for this cylinder group */
 } *inostathead;
 

Index: src/sbin/fsck_ffs/inode.c
diff -u src/sbin/fsck_ffs/inode.c:1.73 src/sbin/fsck_ffs/inode.c:1.73.6.1
--- src/sbin/fsck_ffs/inode.c:1.73	Fri Apr 17 09:42:27 2020
+++ src/sbin/fsck_ffs/inode.c	Sat May 13 12:13:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: inode.c,v 1.73 2020/04/17 09:42:27 jdolecek Exp $	*/
+/*	$NetBSD: inode.c,v 1.73.6.1 2023/05/13 12:13:54 martin Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)inode.c	8.8 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: inode.c,v 1.73 2020/04/17 09:42:27 jdolecek Exp $");
+__RCSID("$NetBSD: inode.c,v 1.73.6.1 2023/05/13 12:13:54 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -731,11 +731,11 @@ allocino(ino_t request, int type)
 		return (0);
 	cg = ino_to_cg(sblock, ino);
 	/* If necessary, extend the inoinfo array. grow exponentially */
-	if ((ino % sblock->fs_ipg) >= (uint64_t)inostathead[cg].il_numalloced) {
-		unsigned long newalloced, i;
+	if ((ino % sblock->fs_ipg) >= inostathead[cg].il_numalloced) {
+		size_t newalloced, i;
 		newalloced = MIN(sblock->fs_ipg,
 			MAX(2 * inostathead[cg].il_numalloced, 10));
-		info = calloc(newalloced, sizeof(struct inostat));
+		info = calloc(newalloced, sizeof(*info));
 		if (info == NULL) {
 			pwarn("cannot alloc %lu bytes to extend inoinfo\n",
 				sizeof(struct inostat) * newalloced);

Index: src/sbin/fsck_ffs/pass4.c
diff -u src/sbin/fsck_ffs/pass4.c:1.28.38.1 src/sbin/fsck_ffs/pass4.c:1.28.38.2
--- src/sbin/fsck_ffs/pass4.c:1.28.38.1	Sat May 13 11:51:14 2023
+++ src/sbin/fsck_ffs/pass4.c	Sat May 13 12:13:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pass4.c,v 1.28.38.1 2023/05/13 11:51:14 martin Exp $	*/
+/*	$NetBSD: pass4.c,v 1.28.38.2 2023/05/13 12:13:54 martin Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pass4.c	8.4 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: pass4.c,v 1.28.38.1 2023/05/13 11:51:14 martin Exp $");
+__RCSID("$NetBSD: pass4.c,v 1.28.38.2 2023/05/13 12:13:54 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -62,7 +62,8 @@ pass4(void)
 	struct zlncnt *zlnp;
 	union dinode *dp;
 	struct inodesc idesc;
-	int n, i;
+	int n;
+	size_t i;
 	uint32_t cg;
 	struct inostat *info;
 

Index: src/sbin/fsck_ffs/utilities.c
diff -u src/sbin/fsck_ffs/utilities.c:1.67 src/sbin/fsck_ffs/utilities.c:1.67.2.1
--- src/sbin/fsck_ffs/utilities.c:1.67	Thu Nov 17 06:40:38 2022
+++ src/sbin/fsck_ffs/utilities.c	Sat May 13 12:13:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: utilities.c,v 1.67 2022/11/17 06:40:38 chs Exp $	*/
+/*	$NetBSD: utilities.c,v 1.67.2.1 2023/05/13 12:13:54 martin Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)utilities.c	8.6 (Berkeley) 5/19/95";
 #else
-__RCSID("$NetBSD: utilities.c,v 1.67 2022/11/17 06:40:38 chs Exp $");
+__RCSID("$NetBSD: utilities.c,v 1.67.2.1 2023/05/13 12:13:54 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -590,7 +590,7 @@ inoinfo(ino_t inum)
 {
 	static struct inostat unallocated = { USTATE, 0, 0 };
 	struct inostatlist *ilp;
-	int iloff;
+	size_t iloff;
 
 	if (inum > maxino)
 		errexit("inoinfo: inumber %llu out of range",

Reply via email to