summaryrefslogtreecommitdiffstats
path: root/sbin/newfs/newfs.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-03-19 17:20:02 +0000
committeriedowse <iedowse@FreeBSD.org>2002-03-19 17:20:02 +0000
commitce097e5509c17c3c87f878d82f08c9d54857fbe4 (patch)
tree658d80c60878e975c461b0b1f1413344f60875ec /sbin/newfs/newfs.c
parent7204dd55d6b506ad5f1def6e39d80b2057f33ef0 (diff)
downloadFreeBSD-src-ce097e5509c17c3c87f878d82f08c9d54857fbe4.zip
FreeBSD-src-ce097e5509c17c3c87f878d82f08c9d54857fbe4.tar.gz
Complete the ANSIfication of newfs by converting function declarations
to C89 style.
Diffstat (limited to 'sbin/newfs/newfs.c')
-rw-r--r--sbin/newfs/newfs.c34
1 files changed, 4 insertions, 30 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 02f8f96..7aee58d 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -69,17 +69,9 @@ static const char rcsid[] =
#include <syslog.h>
#include <unistd.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#if __STDC__
void fatal(const char *fmt, ...) __printflike(1, 2);
-#else
-void fatal();
-#endif
#define COMPAT /* allow non-labeled disks */
@@ -198,19 +190,16 @@ static void rewritelabel (char *s, int fd, register struct disklabel *lp);
static void usage (void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
- int ch;
struct partition *pp;
struct disklabel *lp;
struct disklabel *getdisklabel();
struct partition oldpartition;
struct stat st;
struct statfs *mp;
- int fsi, fso, len, n, vflag;
char *cp, *s1, *s2, *special, *opstring;
+ int ch, fsi, fso, len, n, vflag;
vflag = 0;
if ((progname = strrchr(*argv, '/')))
@@ -536,9 +525,7 @@ const char lmsg[] = "%s: can't read disk label";
#endif
struct disklabel *
-getdisklabel(s, fd)
- char *s;
- int fd;
+getdisklabel(char *s, int fd)
{
static struct disklabel lab;
@@ -561,10 +548,7 @@ getdisklabel(s, fd)
}
void
-rewritelabel(s, fd, lp)
- char *s;
- int fd;
- struct disklabel *lp;
+rewritelabel(char *s, int fd, struct disklabel *lp)
{
#ifdef COMPAT
if (unlabeled)
@@ -580,21 +564,11 @@ rewritelabel(s, fd, lp)
/*VARARGS*/
void
-#if __STDC__
fatal(const char *fmt, ...)
-#else
-fatal(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
va_list ap;
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
if (fcntl(STDERR_FILENO, F_GETFL) < 0) {
openlog(progname, LOG_CONS, LOG_DAEMON);
vsyslog(LOG_ERR, fmt, ap);
OpenPOWER on IntegriCloud