Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makefs Allow for ROOTINO when deciding whether thei...
details: https://anonhg.NetBSD.org/src/rev/45210ec34aa0
branches: trunk
changeset: 566061:45210ec34aa0
user: dsl <dsl%NetBSD.org@localhost>
date: Mon Apr 26 21:06:55 2004 +0000
description:
Allow for ROOTINO when deciding whether their are enough inodes in the
created filesystem. Otherwise this fails when asked for 63 inodes for
i386 ramdisk-big.
This code really needs to use the current version of newfs/mkfs.c where
the actual inode count can be passed in (instead of the density).
Fixes a build problem when I add /mountroot to mtree.common for sysinst.
diffstat:
usr.sbin/makefs/ffs.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 26cff68ddec0 -r 45210ec34aa0 usr.sbin/makefs/ffs.c
--- a/usr.sbin/makefs/ffs.c Mon Apr 26 21:00:38 2004 +0000
+++ b/usr.sbin/makefs/ffs.c Mon Apr 26 21:06:55 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs.c,v 1.27 2004/04/21 01:05:48 christos Exp $ */
+/* $NetBSD: ffs.c,v 1.28 2004/04/26 21:06:55 dsl Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs.c,v 1.27 2004/04/21 01:05:48 christos Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.28 2004/04/26 21:06:55 dsl Exp $");
#endif /* !__lint */
#include <sys/param.h>
@@ -481,11 +481,11 @@
(long long)fs->fs_cstotal.cs_ndir);
}
- if (fs->fs_cstotal.cs_nifree < fsopts->inodes) {
+ if (fs->fs_cstotal.cs_nifree + ROOTINO < fsopts->inodes) {
warnx(
"Image file `%s' has %lld free inodes; %lld are required.",
image,
- (long long)fs->fs_cstotal.cs_nifree,
+ (long long)fs->fs_cstotal.cs_nifree + ROOTINO,
(long long)fsopts->inodes);
return (-1);
}
Home |
Main Index |
Thread Index |
Old Index