diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2023-07-23 23:21:20 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2023-07-23 23:21:20 +0000 |
commit | 1be80e21db0b00421a778eb9820278407928d229 (patch) | |
tree | 821e297db9bdb9196f8b2999ffcd326b3ccf19f8 | |
parent | f8d6a39904775523aa70f2377f7f5c402f49ecda (diff) |
use SMALL to save a shave mfs and tmpfs bits in install media
RAMDISK* has MFS and TMPFS disabled, so the installer can't use them.
OK deraadt
-rw-r--r-- | distrib/special/mount/Makefile | 3 | ||||
-rw-r--r-- | sbin/mount/mount.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/distrib/special/mount/Makefile b/distrib/special/mount/Makefile index ef62add6dc8..05cc7cc9453 100644 --- a/distrib/special/mount/Makefile +++ b/distrib/special/mount/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.1 2014/12/23 17:16:02 deraadt Exp $ +# $OpenBSD: Makefile,v 1.2 2023/07/23 23:21:19 kn Exp $ PROG= mount SRCS= mount.c +COPTS+= -DSMALL DPADD= ${LIBUTIL} LDADD= -lutil MAN= mount.8 diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index b9805191148..eaff190b572 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount.c,v 1.76 2022/12/04 23:50:46 cheloha Exp $ */ +/* $OpenBSD: mount.c,v 1.77 2023/07/23 23:21:19 kn Exp $ */ /* $NetBSD: mount.c,v 1.24 1995/11/18 03:34:29 cgd Exp $ */ /* @@ -565,6 +565,7 @@ prmount(struct statfs *sf) (void)printf(", %s=%d", "acdirmax", nfs_args->acdirmax); } +#ifndef SMALL } else if (strcmp(sf->f_fstypename, MOUNT_MFS) == 0) { int headerlen; long blocksize; @@ -573,6 +574,7 @@ prmount(struct statfs *sf) header = getbsize(&headerlen, &blocksize); (void)printf("%s%s=%lu %s", !f++ ? " (" : ", ", "size", sf->mount_info.mfs_args.size / blocksize, header); +#endif /* SMALL */ } else if (strcmp(sf->f_fstypename, MOUNT_MSDOS) == 0) { struct msdosfs_args *msdosfs_args = &sf->mount_info.msdosfs_args; @@ -597,6 +599,7 @@ prmount(struct statfs *sf) (void)printf("%s%s", !f++ ? " (" : ", ", "gens"); if (iso_args->flags & ISOFSMNT_EXTATT) (void)printf("%s%s", !f++ ? " (" : ", ", "extatt"); +#ifndef SMALL } else if (strcmp(sf->f_fstypename, MOUNT_TMPFS) == 0) { struct tmpfs_args *tmpfs_args = &sf->mount_info.tmpfs_args; @@ -612,6 +615,7 @@ prmount(struct statfs *sf) if (verbose || tmpfs_args->ta_nodes_max) (void)printf("%s%s=%lu", !f++ ? " (" : ", ", "inodes", (unsigned long)tmpfs_args->ta_nodes_max); +#endif /* SMALL */ } (void)printf(f ? ")\n" : "\n"); } |