Define FFS_MAXBSIZE to 65536 and use instead of MAXBSIZE.

Deprecate unused MAXINOPB.
Should fix PR [toolchain/25603].
This commit is contained in:
lukem 2004-06-24 22:30:13 +00:00
parent 47513cedb9
commit be48f412fd
3 changed files with 12 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs.c,v 1.29 2004/06/20 22:20:17 jmc Exp $ */
/* $NetBSD: ffs.c,v 1.30 2004/06/24 22:30:13 lukem Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -71,7 +71,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
__RCSID("$NetBSD: ffs.c,v 1.29 2004/06/20 22:20:17 jmc Exp $");
__RCSID("$NetBSD: ffs.c,v 1.30 2004/06/24 22:30:13 lukem Exp $");
#endif /* !__lint */
#include <sys/param.h>
@ -315,7 +315,7 @@ ffs_validate(const char *dir, fsnode *root, fsinfo_t *fsopts)
fsopts->optimization = DEFAULTOPT;
if (fsopts->maxcontig == -1)
fsopts->maxcontig =
MAX(1, MIN(MAXPHYS, MAXBSIZE) / fsopts->bsize);
MAX(1, MIN(MAXPHYS, FFS_MAXBSIZE) / fsopts->bsize);
/* XXX ondisk32 */
if (fsopts->maxbpg == -1)
fsopts->maxbpg = fsopts->bsize / sizeof(int32_t);
@ -991,7 +991,7 @@ ffs_write_inode(union dinode *dp, uint32_t ino, const fsinfo_t *fsopts)
struct fs *fs;
int cg, cgino, i;
daddr_t d;
char sbbuf[MAXBSIZE];
char sbbuf[FFS_MAXBSIZE];
int32_t initediblk;
assert (dp != NULL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mkfs.c,v 1.19 2004/06/20 22:20:18 jmc Exp $ */
/* $NetBSD: mkfs.c,v 1.20 2004/06/24 22:30:13 lukem Exp $ */
/*
* Copyright (c) 2002 Networks Associates Technology, Inc.
@ -48,7 +48,7 @@
static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95";
#else
#ifdef __RCSID
__RCSID("$NetBSD: mkfs.c,v 1.19 2004/06/20 22:20:18 jmc Exp $");
__RCSID("$NetBSD: mkfs.c,v 1.20 2004/06/24 22:30:13 lukem Exp $");
#endif
#endif
#endif /* not lint */
@ -93,14 +93,14 @@ struct csum *fscs;
union {
struct cg cg;
char pad[MAXBSIZE];
char pad[FFS_MAXBSIZE];
} cgun;
#define acg cgun.cg
char *iobuf;
int iobufsize;
char writebuf[MAXBSIZE];
char writebuf[FFS_MAXBSIZE];
static int Oflag; /* format as an 4.3BSD file system */
static int64_t fssize; /* file system size */
@ -204,9 +204,9 @@ ffs_mkfs(const char *fsys, const fsinfo_t *fsopts)
sblock.fs_bsize, MINBSIZE);
exit(19);
}
if (sblock.fs_bsize > MAXBSIZE) {
if (sblock.fs_bsize > FFS_MAXBSIZE) {
printf("block size %d is too large, maximum is %d\n",
sblock.fs_bsize, MAXBSIZE);
sblock.fs_bsize, FFS_MAXBSIZE);
exit(19);
}
if (sblock.fs_bsize < sblock.fs_fsize) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: newfs_extern.h,v 1.1.1.1 2001/10/26 06:22:10 lukem Exp $ */
/* $NetBSD: newfs_extern.h,v 1.2 2004/06/24 22:30:13 lukem Exp $ */
/* From: NetBSD: extern.h,v 1.3 2000/12/01 12:03:27 simonb Exp $ */
/*
@ -36,6 +36,4 @@ void ffs_write_superblock(struct fs *, const fsinfo_t *);
void ffs_rdfs(daddr_t, int, void *, const fsinfo_t *);
void ffs_wtfs(daddr_t, int, void *, const fsinfo_t *);
#ifndef MAXINOPB
#define MAXINOPB (MAXBSIZE / DINODE_SIZE)
#endif
#define FFS_MAXBSIZE 65536