Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE is
defined. This lets each boot program choose which version of cgbase() it wants to use rather than forcing ufsread.c to have that knowledge. MFC after: 1 week Discussed with: imp
This commit is contained in:
parent
6932638821
commit
a7b201ee6d
@ -93,6 +93,7 @@ static int parse(void);
|
||||
static int xfsread(ino_t, void *, size_t);
|
||||
static int dskread(void *, unsigned, unsigned);
|
||||
|
||||
#define UFS_SMALL_CGBASE
|
||||
#include "ufsread.c"
|
||||
|
||||
static inline int
|
||||
|
@ -48,10 +48,10 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <ufs/ufs/dinode.h>
|
||||
#include <ufs/ffs/fs.h>
|
||||
#if (defined(__i386__) && !defined(GPTBOOT)) || defined(__arm__)
|
||||
#ifdef UFS_SMALL_CGBASE
|
||||
/* XXX: Revert to old (broken for over 1.5Tb filesystems) version of cgbase
|
||||
(see sys/ufs/ffs/fs.h rev 1.39) so that i386 boot loader (boot2) can
|
||||
support both UFS1 and UFS2 again. */
|
||||
(see sys/ufs/ffs/fs.h rev 1.39) so that small boot loaders (e.g. boot2) can
|
||||
support both UFS1 and UFS2. */
|
||||
#undef cgbase
|
||||
#define cgbase(fs, c) ((ufs2_daddr_t)((fs)->fs_fpg * (c)))
|
||||
#endif
|
||||
|
@ -168,6 +168,7 @@ strcmp(const char *s1, const char *s2)
|
||||
return (unsigned char)*s1 - (unsigned char)*s2;
|
||||
}
|
||||
|
||||
#define UFS_SMALL_CGBASE
|
||||
#include "ufsread.c"
|
||||
|
||||
static inline int
|
||||
|
@ -167,7 +167,6 @@ strcmp(const char *s1, const char *s2)
|
||||
return (unsigned char)*s1 - (unsigned char)*s2;
|
||||
}
|
||||
|
||||
#define GPTBOOT
|
||||
#include "ufsread.c"
|
||||
|
||||
static inline int
|
||||
|
Loading…
Reference in New Issue
Block a user