From 816b5578c852cefe81c0d23e858ab5f3667d2783 Mon Sep 17 00:00:00 2001 From: xtraeme Date: Sat, 5 Feb 2005 14:47:18 +0000 Subject: [PATCH] Kill __P(), use ANSI function declarations; WARNS=3. --- sbin/mount_ados/Makefile | 4 +++- sbin/mount_ados/mount_ados.c | 15 ++++++--------- sbin/mount_cd9660/Makefile | 4 +++- sbin/mount_cd9660/mount_cd9660.c | 19 +++++++------------ sbin/mount_ext2fs/Makefile | 4 +++- sbin/mount_ext2fs/mount_ext2fs.c | 19 +++++++------------ sbin/mount_fdesc/Makefile | 4 +++- sbin/mount_fdesc/mount_fdesc.c | 19 +++++++------------ 8 files changed, 39 insertions(+), 49 deletions(-) diff --git a/sbin/mount_ados/Makefile b/sbin/mount_ados/Makefile index 5b55f91a5b32..f903016b669e 100644 --- a/sbin/mount_ados/Makefile +++ b/sbin/mount_ados/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2003/03/22 12:43:57 jdolecek Exp $ +# $NetBSD: Makefile,v 1.12 2005/02/05 14:47:18 xtraeme Exp $ .include @@ -6,6 +6,8 @@ PROG= mount_ados SRCS= mount_ados.c fattr.c MAN= mount_ados.8 +WARNS= 3 + MOUNT= ${NETBSDSRCDIR}/sbin/mount CPPFLAGS+= -I${NETBSDSRCDIR}/sys -I${MOUNT} .PATH: ${MOUNT} diff --git a/sbin/mount_ados/mount_ados.c b/sbin/mount_ados/mount_ados.c index b4d01ebc1346..1478997a4ca8 100644 --- a/sbin/mount_ados/mount_ados.c +++ b/sbin/mount_ados/mount_ados.c @@ -1,4 +1,4 @@ -/* $NetBSD: mount_ados.c,v 1.18 2005/01/31 05:19:18 erh Exp $ */ +/* $NetBSD: mount_ados.c,v 1.19 2005/02/05 14:47:18 xtraeme Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -36,7 +36,7 @@ #include #ifndef lint -__RCSID("$NetBSD: mount_ados.c,v 1.18 2005/01/31 05:19:18 erh Exp $"); +__RCSID("$NetBSD: mount_ados.c,v 1.19 2005/02/05 14:47:18 xtraeme Exp $"); #endif /* not lint */ #include @@ -64,9 +64,8 @@ static const struct mntopt mopts[] = { { NULL } }; -int main __P((int, char *[])); -int mount_ados __P((int argc, char **argv)); -static void usage __P((void)); +int mount_ados(int argc, char **argv); +static void usage(void); #ifndef MOUNT_NOMAIN int @@ -77,9 +76,7 @@ main(int argc, char **argv) #endif int -mount_ados(argc, argv) - int argc; - char **argv; +mount_ados(int argc, char **argv) { struct adosfs_args args; struct stat sb; @@ -173,7 +170,7 @@ mount_ados(argc, argv) } static void -usage() +usage(void) { fprintf(stderr, "usage: mount_ados [-o options] [-u user] [-g group] [-m mask] bdev dir\n"); diff --git a/sbin/mount_cd9660/Makefile b/sbin/mount_cd9660/Makefile index fb6ed0d56779..b3bc2e19900d 100644 --- a/sbin/mount_cd9660/Makefile +++ b/sbin/mount_cd9660/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2003/03/22 12:43:58 jdolecek Exp $ +# $NetBSD: Makefile,v 1.10 2005/02/05 14:49:36 xtraeme Exp $ # @(#)Makefile 8.3 (Berkeley) 3/27/94 .include @@ -7,6 +7,8 @@ PROG= mount_cd9660 SRCS= mount_cd9660.c MAN= mount_cd9660.8 +WARNS= 3 + MOUNT= ${NETBSDSRCDIR}/sbin/mount DPADD+=${LIBUTIL} diff --git a/sbin/mount_cd9660/mount_cd9660.c b/sbin/mount_cd9660/mount_cd9660.c index 90e7f3e4663c..ebc86ba6027e 100644 --- a/sbin/mount_cd9660/mount_cd9660.c +++ b/sbin/mount_cd9660/mount_cd9660.c @@ -1,4 +1,4 @@ -/* $NetBSD: mount_cd9660.c,v 1.19 2005/01/31 05:19:19 erh Exp $ */ +/* $NetBSD: mount_cd9660.c,v 1.20 2005/02/05 14:49:36 xtraeme Exp $ */ /* * Copyright (c) 1992, 1993, 1994 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)mount_cd9660.c 8.7 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mount_cd9660.c,v 1.19 2005/01/31 05:19:19 erh Exp $"); +__RCSID("$NetBSD: mount_cd9660.c,v 1.20 2005/02/05 14:49:36 xtraeme Exp $"); #endif #endif /* not lint */ @@ -78,24 +78,19 @@ static const struct mntopt mopts[] = { { NULL } }; -int main __P((int, char *[])); -int mount_cd9660 __P((int argc, char **argv)); -static void usage __P((void)); +int mount_cd9660(int argc, char **argv); +static void usage(void); #ifndef MOUNT_NOMAIN int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { return mount_cd9660(argc, argv); } #endif int -mount_cd9660(argc, argv) - int argc; - char **argv; +mount_cd9660(int argc, char **argv) { struct iso_args args; int ch, mntflags, opts; @@ -177,7 +172,7 @@ mount_cd9660(argc, argv) } static void -usage() +usage(void) { (void)fprintf(stderr, "usage: mount_cd9660 [-o options] special node\n"); diff --git a/sbin/mount_ext2fs/Makefile b/sbin/mount_ext2fs/Makefile index d9aaf3760767..3ff2a43dc3d0 100644 --- a/sbin/mount_ext2fs/Makefile +++ b/sbin/mount_ext2fs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2003/03/22 12:43:58 jdolecek Exp $ +# $NetBSD: Makefile,v 1.6 2005/02/05 14:51:16 xtraeme Exp $ # # $OpenBSD: Makefile,v 1.1 1996/06/27 07:20:28 downsj Exp $ @@ -8,6 +8,8 @@ PROG= mount_ext2fs SRCS= mount_ext2fs.c MAN= mount_ext2fs.8 +WARNS= 3 + DPADD+=${LIBUTIL} LDADD+=-lutil diff --git a/sbin/mount_ext2fs/mount_ext2fs.c b/sbin/mount_ext2fs/mount_ext2fs.c index 8309559facb0..ed0a35afbc92 100644 --- a/sbin/mount_ext2fs/mount_ext2fs.c +++ b/sbin/mount_ext2fs/mount_ext2fs.c @@ -1,4 +1,4 @@ -/* $NetBSD: mount_ext2fs.c,v 1.12 2005/01/31 05:19:19 erh Exp $ */ +/* $NetBSD: mount_ext2fs.c,v 1.13 2005/02/05 14:51:16 xtraeme Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)mount_ufs.c 8.4 (Berkeley) 4/26/95"; #else -__RCSID("$NetBSD: mount_ext2fs.c,v 1.12 2005/01/31 05:19:19 erh Exp $"); +__RCSID("$NetBSD: mount_ext2fs.c,v 1.13 2005/02/05 14:51:16 xtraeme Exp $"); #endif #endif /* not lint */ @@ -57,9 +57,8 @@ __RCSID("$NetBSD: mount_ext2fs.c,v 1.12 2005/01/31 05:19:19 erh Exp $"); #include -static void ext2fs_usage __P((void)); -int main __P((int, char *[])); -int mount_ext2fs __P((int argc, char **argv)); +static void ext2fs_usage(void); +int mount_ext2fs(int argc, char **argv); static const struct mntopt mopts[] = { MOPT_STDOPTS, @@ -75,18 +74,14 @@ static const struct mntopt mopts[] = { #ifndef MOUNT_NOMAIN int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { return mount_ext2fs(argc, argv); } #endif int -mount_ext2fs(argc, argv) - int argc; - char *argv[]; +mount_ext2fs(int argc, char *argv[]) { struct ufs_args args; /* XXX ffs_args */ int ch, mntflags; @@ -154,7 +149,7 @@ mount_ext2fs(argc, argv) } static void -ext2fs_usage() +ext2fs_usage(void) { (void)fprintf(stderr, "usage: mount_ext2fs [-o options] special node\n"); diff --git a/sbin/mount_fdesc/Makefile b/sbin/mount_fdesc/Makefile index be209d6e9a74..651144f29bd0 100644 --- a/sbin/mount_fdesc/Makefile +++ b/sbin/mount_fdesc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2003/03/22 12:43:58 jdolecek Exp $ +# $NetBSD: Makefile,v 1.12 2005/02/05 14:53:03 xtraeme Exp $ # @(#)Makefile 8.2 (Berkeley) 3/27/94 .include @@ -7,6 +7,8 @@ PROG= mount_fdesc SRCS= mount_fdesc.c MAN= mount_fdesc.8 +WARNS= 3 + DPADD+=${LIBUTIL} LDADD+=-lutil diff --git a/sbin/mount_fdesc/mount_fdesc.c b/sbin/mount_fdesc/mount_fdesc.c index 7f48d2c576b9..321117e8cb8f 100644 --- a/sbin/mount_fdesc/mount_fdesc.c +++ b/sbin/mount_fdesc/mount_fdesc.c @@ -1,4 +1,4 @@ -/* $NetBSD: mount_fdesc.c,v 1.15 2005/01/31 05:19:19 erh Exp $ */ +/* $NetBSD: mount_fdesc.c,v 1.16 2005/02/05 14:53:03 xtraeme Exp $ */ /* * Copyright (c) 1992, 1993, 1994 @@ -77,7 +77,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)mount_fdesc.c 8.3 (Berkeley) 4/26/95"; #else -__RCSID("$NetBSD: mount_fdesc.c,v 1.15 2005/01/31 05:19:19 erh Exp $"); +__RCSID("$NetBSD: mount_fdesc.c,v 1.16 2005/02/05 14:53:03 xtraeme Exp $"); #endif #endif /* not lint */ @@ -98,24 +98,19 @@ static const struct mntopt mopts[] = { { NULL } }; -static void usage __P((void)); -int main __P((int, char *[])); -int mount_fdesc __P((int argc, char **argv)); +static void usage(void); +int mount_fdesc(int argc, char **argv); #ifndef MOUNT_NOMAIN int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { return mount_fdesc(argc, argv); } #endif int -mount_fdesc(argc, argv) - int argc; - char *argv[]; +mount_fdesc(int argc, char *argv[]) { int ch, mntflags; char canon_dir[MAXPATHLEN]; @@ -149,7 +144,7 @@ mount_fdesc(argc, argv) } static void -usage() +usage(void) { (void)fprintf(stderr, "usage: mount_fdesc [-o options] fdesc mount_point\n");