Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fsck_ffs catch up with sign changes in the fs.h
details: https://anonhg.NetBSD.org/src/rev/cc13caf7e729
branches: trunk
changeset: 373037:cc13caf7e729
user: christos <christos%NetBSD.org@localhost>
date: Sat Jan 14 12:12:50 2023 +0000
description:
catch up with sign changes in the fs.h
diffstat:
sbin/fsck_ffs/fsck.h | 4 ++--
sbin/fsck_ffs/inode.c | 10 +++++-----
sbin/fsck_ffs/pass4.c | 7 ++++---
sbin/fsck_ffs/utilities.c | 6 +++---
4 files changed, 14 insertions(+), 13 deletions(-)
diffs (106 lines):
diff -r e1f4ba4dde59 -r cc13caf7e729 sbin/fsck_ffs/fsck.h
--- a/sbin/fsck_ffs/fsck.h Sat Jan 14 11:15:07 2023 +0000
+++ b/sbin/fsck_ffs/fsck.h Sat Jan 14 12:12:50 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fsck.h,v 1.56 2022/11/17 06:40:38 chs Exp $ */
+/* $NetBSD: fsck.h,v 1.57 2023/01/14 12:12:50 christos Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -97,7 +97,7 @@
* 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;
diff -r e1f4ba4dde59 -r cc13caf7e729 sbin/fsck_ffs/inode.c
--- a/sbin/fsck_ffs/inode.c Sat Jan 14 11:15:07 2023 +0000
+++ b/sbin/fsck_ffs/inode.c Sat Jan 14 12:12:50 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inode.c,v 1.73 2020/04/17 09:42:27 jdolecek Exp $ */
+/* $NetBSD: inode.c,v 1.74 2023/01/14 12:12:50 christos 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.74 2023/01/14 12:12:50 christos Exp $");
#endif
#endif /* not lint */
@@ -731,11 +731,11 @@
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);
diff -r e1f4ba4dde59 -r cc13caf7e729 sbin/fsck_ffs/pass4.c
--- a/sbin/fsck_ffs/pass4.c Sat Jan 14 11:15:07 2023 +0000
+++ b/sbin/fsck_ffs/pass4.c Sat Jan 14 12:12:50 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass4.c,v 1.29 2023/01/07 19:41:29 chs Exp $ */
+/* $NetBSD: pass4.c,v 1.30 2023/01/14 12:12:50 christos 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.29 2023/01/07 19:41:29 chs Exp $");
+__RCSID("$NetBSD: pass4.c,v 1.30 2023/01/14 12:12:50 christos Exp $");
#endif
#endif /* not lint */
@@ -62,7 +62,8 @@
struct zlncnt *zlnp;
union dinode *dp;
struct inodesc idesc;
- int n, i;
+ int n;
+ size_t i;
uint32_t cg;
struct inostat *info;
diff -r e1f4ba4dde59 -r cc13caf7e729 sbin/fsck_ffs/utilities.c
--- a/sbin/fsck_ffs/utilities.c Sat Jan 14 11:15:07 2023 +0000
+++ b/sbin/fsck_ffs/utilities.c Sat Jan 14 12:12:50 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: utilities.c,v 1.67 2022/11/17 06:40:38 chs Exp $ */
+/* $NetBSD: utilities.c,v 1.68 2023/01/14 12:12:50 christos 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.68 2023/01/14 12:12:50 christos Exp $");
#endif
#endif /* not lint */
@@ -590,7 +590,7 @@
{
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",
Home |
Main Index |
Thread Index |
Old Index