From 899149f1e5deac97c75b9e6bb52aab570376ca9e Mon Sep 17 00:00:00 2001 From: tsutsui Date: Sun, 18 Feb 2001 06:15:48 +0000 Subject: [PATCH] Add x_mount, which does not include any MOUNT_PROGS. Installer does not require all vfs progs and all binaries are crunched after all. --- distrib/utils/Makefile | 6 +++--- distrib/utils/x_mount/Makefile | 20 ++++++++++++++++++++ sbin/mount/mount.c | 8 ++++++-- 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 distrib/utils/x_mount/Makefile diff --git a/distrib/utils/Makefile b/distrib/utils/Makefile index f728c6ce799f..89325d283d94 100644 --- a/distrib/utils/Makefile +++ b/distrib/utils/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.11 2001/01/31 20:48:11 tsutsui Exp $ +# $NetBSD: Makefile,v 1.12 2001/02/18 06:15:48 tsutsui Exp $ SUBDIR= libhack init_s more ssh tls \ - x_dd x_dhclient x_dmesg x_ed x_ftp x_gzip x_ifconfig x_netstat x_ping \ - x_route x_sh x_umount zcat + x_dd x_dhclient x_dmesg x_ed x_ftp x_gzip x_ifconfig x_mount \ + x_netstat x_ping x_route x_sh x_umount zcat .if exists(sysinst/arch/${MACHINE}) SUBDIR+=sysinst diff --git a/distrib/utils/x_mount/Makefile b/distrib/utils/x_mount/Makefile new file mode 100644 index 000000000000..9b213eb037d6 --- /dev/null +++ b/distrib/utils/x_mount/Makefile @@ -0,0 +1,20 @@ +# $NetBSD: Makefile,v 1.1 2001/02/18 06:15:49 tsutsui Exp $ +# Build a smaller mount (i.e. for boot media) + +PROG= mount +MKMAN= no + +SRCDIR= ${.CURDIR}/../../../sbin/mount + +SRCS= mount.c vfslist.c + +CPPFLAGS+= -DNO_MOUNT_PROGS -I${SRCDIR} +COPTS+= -Os +LDSTATIC?=-static +WARNS?= 1 + +all: ${PROG} + +.include + +.PATH: ${SRCDIR} diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 21d0c7718a6d..e8f52e5d0fc0 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -1,4 +1,4 @@ -/* $NetBSD: mount.c,v 1.55 2000/11/01 04:10:02 enami Exp $ */ +/* $NetBSD: mount.c,v 1.56 2001/02/18 06:15:49 tsutsui Exp $ */ /* * Copyright (c) 1980, 1989, 1993, 1994 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1989, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95"; #else -__RCSID("$NetBSD: mount.c,v 1.55 2000/11/01 04:10:02 enami Exp $"); +__RCSID("$NetBSD: mount.c,v 1.56 2001/02/18 06:15:49 tsutsui Exp $"); #endif #endif /* not lint */ @@ -83,7 +83,9 @@ static int mountfs __P((const char *, const char *, const char *, static void prmount __P((struct statfs *)); static void usage __P((void)); +#ifndef NO_MOUNT_PROGS void checkname __P((int, char *[])); +#endif int main __P((int, char *[])); /* Map from mount otions to printable formats. */ @@ -130,8 +132,10 @@ main(argc, argv) char *options; const char *mountopts, *fstypename; +#ifndef NO_MOUNT_PROGS /* if called as specific mount, call it's main mount routine */ checkname(argc, argv); +#endif /* started as "mount" */ all = forceall = init_flags = 0;