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. * Copyright (c) 2001 Wasabi Systems, Inc.
@ -71,7 +71,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint) #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 */ #endif /* !__lint */
#include <sys/param.h> #include <sys/param.h>
@ -315,7 +315,7 @@ ffs_validate(const char *dir, fsnode *root, fsinfo_t *fsopts)
fsopts->optimization = DEFAULTOPT; fsopts->optimization = DEFAULTOPT;
if (fsopts->maxcontig == -1) if (fsopts->maxcontig == -1)
fsopts->maxcontig = fsopts->maxcontig =
MAX(1, MIN(MAXPHYS, MAXBSIZE) / fsopts->bsize); MAX(1, MIN(MAXPHYS, FFS_MAXBSIZE) / fsopts->bsize);
/* XXX ondisk32 */ /* XXX ondisk32 */
if (fsopts->maxbpg == -1) if (fsopts->maxbpg == -1)
fsopts->maxbpg = fsopts->bsize / sizeof(int32_t); 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; struct fs *fs;
int cg, cgino, i; int cg, cgino, i;
daddr_t d; daddr_t d;
char sbbuf[MAXBSIZE]; char sbbuf[FFS_MAXBSIZE];
int32_t initediblk; int32_t initediblk;
assert (dp != NULL); 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. * Copyright (c) 2002 Networks Associates Technology, Inc.
@ -48,7 +48,7 @@
static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95"; static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95";
#else #else
#ifdef __RCSID #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 #endif
#endif /* not lint */ #endif /* not lint */
@ -93,14 +93,14 @@ struct csum *fscs;
union { union {
struct cg cg; struct cg cg;
char pad[MAXBSIZE]; char pad[FFS_MAXBSIZE];
} cgun; } cgun;
#define acg cgun.cg #define acg cgun.cg
char *iobuf; char *iobuf;
int iobufsize; int iobufsize;
char writebuf[MAXBSIZE]; char writebuf[FFS_MAXBSIZE];
static int Oflag; /* format as an 4.3BSD file system */ static int Oflag; /* format as an 4.3BSD file system */
static int64_t fssize; /* file system size */ static int64_t fssize; /* file system size */
@ -204,9 +204,9 @@ ffs_mkfs(const char *fsys, const fsinfo_t *fsopts)
sblock.fs_bsize, MINBSIZE); sblock.fs_bsize, MINBSIZE);
exit(19); exit(19);
} }
if (sblock.fs_bsize > MAXBSIZE) { if (sblock.fs_bsize > FFS_MAXBSIZE) {
printf("block size %d is too large, maximum is %d\n", printf("block size %d is too large, maximum is %d\n",
sblock.fs_bsize, MAXBSIZE); sblock.fs_bsize, FFS_MAXBSIZE);
exit(19); exit(19);
} }
if (sblock.fs_bsize < sblock.fs_fsize) { 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 $ */ /* 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_rdfs(daddr_t, int, void *, const fsinfo_t *);
void ffs_wtfs(daddr_t, int, void *, const fsinfo_t *); void ffs_wtfs(daddr_t, int, void *, const fsinfo_t *);
#ifndef MAXINOPB #define FFS_MAXBSIZE 65536
#define MAXINOPB (MAXBSIZE / DINODE_SIZE)
#endif