Page MenuHomeFreeBSD

D36175.diff
No OneTemporary

D36175.diff

diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile
--- a/stand/libsa/Makefile
+++ b/stand/libsa/Makefile
@@ -170,6 +170,17 @@
.PATH: ${SRCTOP}/sys/ufs/ffs
SRCS+=ffs_subr.c ffs_tables.c
+#
+# i386 has a constrained space for its /boot/loader, so compile out the
+# extensive messages diagnosing bad superblocks. i386 doesn't support UEFI
+# booting, so doing it always makes sense natively there. When we compile
+# for 32-bit on amd64, LIBSA_CPUARCH is also i386 and we use libsa32 only
+# for the BIOS /boot/loader which has the same constraints.
+#
+.if ${LIBSA_CPUARCH} == "i386"
+CFLAGS.ffs_subr.c+= -DSTANDALONE_SMALL
+.endif
+
CFLAGS.gzipfs.c+= ${ZLIB_CFLAGS}
CFLAGS.pkgfs.c+= ${ZLIB_CFLAGS}
CFLAGS.bzipfs.c+= -I${SRCTOP}/contrib/bzip2 -DBZ_NO_STDIO -DBZ_NO_COMPRESS
diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c
--- a/sys/ufs/ffs/ffs_subr.c
+++ b/sys/ufs/ffs/ffs_subr.c
@@ -323,7 +323,11 @@
* Verify the filesystem values.
*/
#define ILOG2(num) (fls(num) - 1)
-#define MPRINT if (prtmsg) printf
+#ifdef STANDALONE_SMALL
+#define MPRINT(...) do { } while (0)
+#else
+#define MPRINT(...) if (prtmsg) printf(__VA_ARGS__)
+#endif
#define FCHK(lhs, op, rhs, fmt) \
if (lhs op rhs) { \
MPRINT("UFS%d superblock failed: %s (" #fmt ") %s %s (" \

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 11:34 AM (21 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14675476
Default Alt Text
D36175.diff (1 KB)

Event Timeline