summaryrefslogtreecommitdiff
path: root/sbin/newlfs
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-07-17 02:14:34 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-07-17 02:14:34 +0000
commit777e443a4907c980d426ece9a6f7cdb21fea4f1b (patch)
treec7899405ab91d9f045012553ebfb1b8f7300f21b /sbin/newlfs
parent5757b9a265e6ab7af9c725d74bf16cbf90747d02 (diff)
some ansi; khalek@linuxgamers.net
Diffstat (limited to 'sbin/newlfs')
-rw-r--r--sbin/newlfs/lfs.c42
-rw-r--r--sbin/newlfs/misc.c7
-rw-r--r--sbin/newlfs/newfs.c22
3 files changed, 26 insertions, 45 deletions
diff --git a/sbin/newlfs/lfs.c b/sbin/newlfs/lfs.c
index 6d145f307f7..def2fc304fd 100644
--- a/sbin/newlfs/lfs.c
+++ b/sbin/newlfs/lfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lfs.c,v 1.8 2003/07/29 18:38:36 deraadt Exp $ */
+/* $OpenBSD: lfs.c,v 1.9 2004/07/17 02:14:33 deraadt Exp $ */
/* $NetBSD: lfs.c,v 1.8 1995/06/19 21:30:36 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)lfs.c 8.5 (Berkeley) 5/24/95";
#else
-static char rcsid[] = "$OpenBSD: lfs.c,v 1.8 2003/07/29 18:38:36 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: lfs.c,v 1.9 2004/07/17 02:14:33 deraadt Exp $";
#endif
#endif /* not lint */
@@ -169,14 +169,8 @@ static void make_dir( void *, struct direct *, int);
static void put(int, off_t, void *, size_t);
int
-make_lfs(fd, lp, partp, minfree, block_size, frag_size, seg_size)
- int fd;
- struct disklabel *lp;
- struct partition *partp;
- int minfree;
- int block_size;
- int frag_size;
- int seg_size;
+make_lfs(int fd, struct disklabel *lp, struct partition *partp, int minfree,
+ int block_size, int frag_size, int seg_size)
{
struct dinode *dip; /* Pointer to a disk inode */
struct dinode *dpagep; /* Pointer to page of disk inodes */
@@ -602,11 +596,7 @@ make_lfs(fd, lp, partp, minfree, block_size, frag_size, seg_size)
}
static void
-put(fd, off, p, len)
- int fd;
- off_t off;
- void *p;
- size_t len;
+put(int fd, off_t off, void *p, size_t len)
{
int wbytes;
@@ -624,16 +614,19 @@ put(fd, off, p, len)
*/
void
-lfsinit()
+lfsinit(void)
{}
+/*
+ * ino : inode we're creating
+ * dip : disk inode
+ * nblocks: number of blocks in file
+ * saddr : starting block address
+ * lfsp : superblock
+ */
static daddr_t
-make_dinode(ino, dip, nblocks, saddr, lfsp)
- ino_t ino; /* inode we're creating */
- struct dinode *dip; /* disk inode */
- int nblocks; /* number of blocks in file */
- daddr_t saddr; /* starting block address */
- struct lfs *lfsp; /* superblock */
+make_dinode(ino_t ino, struct dinode *dip, int nblocks, daddr_t saddr,
+ struct lfs *lfsp)
{
int db_per_fb, i;
@@ -664,10 +657,7 @@ make_dinode(ino, dip, nblocks, saddr, lfsp)
* entries in protodir fir in the first DIRBLKSIZ.
*/
static void
-make_dir(bufp, protodir, entries)
- void *bufp;
- struct direct *protodir;
- int entries;
+make_dir(void *bufp, struct direct *protodir, int entries)
{
char *cp;
int i, spcleft;
diff --git a/sbin/newlfs/misc.c b/sbin/newlfs/misc.c
index a2f3bfa8737..c3e5ede59fe 100644
--- a/sbin/newlfs/misc.c
+++ b/sbin/newlfs/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.7 2003/11/15 00:18:38 tedu Exp $ */
+/* $OpenBSD: misc.c,v 1.8 2004/07/17 02:14:33 deraadt Exp $ */
/* $NetBSD: misc.c,v 1.2 1995/03/18 14:58:51 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: misc.c,v 1.7 2003/11/15 00:18:38 tedu Exp $";
+static char rcsid[] = "$OpenBSD: misc.c,v 1.8 2004/07/17 02:14:33 deraadt Exp $";
#endif
#endif /* not lint */
@@ -46,8 +46,7 @@ static char rcsid[] = "$OpenBSD: misc.c,v 1.7 2003/11/15 00:18:38 tedu Exp $";
#include "extern.h"
u_int
-log2(num)
- u_int num;
+log2(u_int num)
{
u_int i, limit;
diff --git a/sbin/newlfs/newfs.c b/sbin/newlfs/newfs.c
index 614bb81f9fd..f901875b05c 100644
--- a/sbin/newlfs/newfs.c
+++ b/sbin/newlfs/newfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs.c,v 1.14 2003/06/25 21:24:25 deraadt Exp $ */
+/* $OpenBSD: newfs.c,v 1.15 2004/07/17 02:14:33 deraadt Exp $ */
/* $NetBSD: newfs.c,v 1.5 1996/05/16 07:17:50 thorpej Exp $ */
/*-
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)newfs.c 8.5 (Berkeley) 5/24/95";
#else
-static char rcsid[] = "$OpenBSD: newfs.c,v 1.14 2003/06/25 21:24:25 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: newfs.c,v 1.15 2004/07/17 02:14:33 deraadt Exp $";
#endif
#endif /* not lint */
@@ -120,9 +120,7 @@ static void rewritelabel(char *, int, struct disklabel *);
static void usage(void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int ch;
struct partition *pp;
@@ -337,9 +335,7 @@ char lmsg[] = "%s: can't read disk label";
#endif
static struct disklabel *
-getdisklabel(s, fd)
- char *s;
- int fd;
+getdisklabel(char *s, int fd)
{
static struct disklabel lab;
@@ -364,8 +360,7 @@ getdisklabel(s, fd)
static struct disklabel *
-debug_readlabel(fd)
- int fd;
+debug_readlabel(int fd)
{
static struct disklabel lab;
int n;
@@ -379,10 +374,7 @@ debug_readlabel(fd)
}
static void
-rewritelabel(s, fd, lp)
- char *s;
- int fd;
- struct disklabel *lp;
+rewritelabel(char *s, int fd, struct disklabel *lp)
{
#ifdef COMPAT
if (unlabeled)
@@ -433,7 +425,7 @@ rewritelabel(s, fd, lp)
}
void
-usage()
+usage(void)
{
if (mfs) {
fprintf(stderr,