summaryrefslogtreecommitdiffstats
path: root/usr.sbin/makefs
diff options
context:
space:
mode:
authornatano <natano@openbsd.org>2016-10-17 13:45:38 +0000
committernatano <natano@openbsd.org>2016-10-17 13:45:38 +0000
commit1e3d247cf5714e1c3def06f9a22b67f67338e3ed (patch)
treed319eeee5e1c765dae3cc24a4e943fc76b160e45 /usr.sbin/makefs
parentFix a few mistakes and add a FILES entry for /etc/ldap/certs (diff)
downloadwireguard-openbsd-1e3d247cf5714e1c3def06f9a22b67f67338e3ed.tar.xz
wireguard-openbsd-1e3d247cf5714e1c3def06f9a22b67f67338e3ed.zip
Dedup ffs_extern.h.
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r--usr.sbin/makefs/ffs/ffs_extern.h10
-rw-r--r--usr.sbin/makefs/ufs/ffs/ffs_extern.h102
-rw-r--r--usr.sbin/makefs/ufs/ffs/ffs_subr.c6
3 files changed, 6 insertions, 112 deletions
diff --git a/usr.sbin/makefs/ffs/ffs_extern.h b/usr.sbin/makefs/ffs/ffs_extern.h
index 423cd6bc63a..51bbff8fdef 100644
--- a/usr.sbin/makefs/ffs/ffs_extern.h
+++ b/usr.sbin/makefs/ffs/ffs_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_extern.h,v 1.4 2016/10/17 01:16:22 tedu Exp $ */
+/* $OpenBSD: ffs_extern.h,v 1.5 2016/10/17 13:45:38 natano Exp $ */
/* $NetBSD: ffs_extern.h,v 1.6 2003/08/07 11:25:33 agc Exp $ */
/* From: NetBSD: ffs_extern.h,v 1.19 2001/08/17 02:18:48 lukem Exp */
@@ -50,6 +50,7 @@ void panic(const char *, ...)
__attribute__((__noreturn__,__format__(__printf__,1,2)));
/* ffs_alloc.c */
+struct inode;
int ffs_alloc(struct inode *, daddr_t, daddr_t, int, daddr_t *);
daddr_t ffs_blkpref_ufs1(struct inode *, daddr_t, int, int32_t *);
daddr_t ffs_blkpref_ufs2(struct inode *, daddr_t, int, int64_t *);
@@ -58,13 +59,6 @@ void ffs_clusteracct(struct fs *, struct cg *, int32_t, int);
/* ffs_balloc.c */
int ffs_balloc(struct inode *, off_t, int, struct mkfsbuf **);
- /* ffs_bswap.c */
-void ffs_sb_swap(struct fs*, struct fs *);
-void ffs_dinode1_swap(struct ufs1_dinode *, struct ufs1_dinode *);
-void ffs_dinode2_swap(struct ufs2_dinode *, struct ufs2_dinode *);
-void ffs_csum_swap(struct csum *, struct csum *, int);
-void ffs_cg_swap(struct cg *, struct cg *, struct fs *);
-
/* ffs_subr.c */
int ffs_isblock(struct fs *, u_char *, int32_t);
void ffs_clrblock(struct fs *, u_char *, int32_t);
diff --git a/usr.sbin/makefs/ufs/ffs/ffs_extern.h b/usr.sbin/makefs/ufs/ffs/ffs_extern.h
deleted file mode 100644
index dd7b5697c99..00000000000
--- a/usr.sbin/makefs/ufs/ffs/ffs_extern.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* $OpenBSD: ffs_extern.h,v 1.4 2016/10/17 01:16:22 tedu Exp $ */
-/* $NetBSD: ffs_extern.h,v 1.83 2016/10/01 13:15:45 jdolecek Exp $ */
-
-/*-
- * Copyright (c) 1991, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ffs_extern.h 8.6 (Berkeley) 3/30/95
- */
-
-#ifndef _UFS_FFS_FFS_EXTERN_H_
-#define _UFS_FFS_FFS_EXTERN_H_
-
-/*
- * Sysctl values for the fast filesystem.
- */
-#define FFS_CLUSTERREAD 1 /* cluster reading enabled */
-#define FFS_CLUSTERWRITE 2 /* cluster writing enabled */
-#define FFS_REALLOCBLKS 3 /* block reallocation enabled */
-#define FFS_ASYNCFREE 4 /* asynchronous block freeing enabled */
-#define FFS_LOG_CHANGEOPT 5 /* log optimalization strategy change */
-#define FFS_EXTATTR_AUTOCREATE 6 /* size for backing file autocreation */
-#define FFS_MAXID 7 /* number of valid ffs ids */
-
-struct mkfsbuf;
-struct fid;
-struct fs;
-struct inode;
-struct ufs1_dinode;
-struct ufs2_dinode;
-struct mount;
-struct nameidata;
-struct lwp;
-struct statvfs;
-struct timeval;
-struct timespec;
-struct ufsmount;
-struct uio;
-struct mkfsvnode;
-struct mbuf;
-struct cg;
-
-
-__BEGIN_DECLS
-
-
-/* ffs_appleufs.c */
-struct appleufslabel;
-u_int16_t ffs_appleufs_cksum(const struct appleufslabel *);
-int ffs_appleufs_validate(const char*, const struct appleufslabel *,
- struct appleufslabel *);
-void ffs_appleufs_set(struct appleufslabel *, const char *, time_t,
- uint64_t);
-
-/* ffs_bswap.c */
-void ffs_sb_swap(struct fs*, struct fs *);
-void ffs_dinode1_swap(struct ufs1_dinode *, struct ufs1_dinode *);
-void ffs_dinode2_swap(struct ufs2_dinode *, struct ufs2_dinode *);
-struct csum;
-void ffs_csum_swap(struct csum *, struct csum *, int);
-struct csum_total;
-void ffs_csumtotal_swap(struct csum_total *, struct csum_total *);
-void ffs_cg_swap(struct cg *, struct cg *, struct fs *);
-
-/* ffs_subr.c */
-int ffs_isblock(struct fs *, u_char *, int32_t);
-void ffs_clrblock(struct fs *, u_char *, int32_t);
-void ffs_setblock(struct fs *, u_char *, int32_t);
-void ffs_itimes(struct inode *, const struct timespec *,
- const struct timespec *, const struct timespec *);
-void ffs_clusteracct(struct fs *, struct cg *, int32_t, int);
-
-/* ffs_quota2.c */
-int ffs_quota2_mount(struct mount *);
-
-__END_DECLS
-
-#endif /* !_UFS_FFS_FFS_EXTERN_H_ */
diff --git a/usr.sbin/makefs/ufs/ffs/ffs_subr.c b/usr.sbin/makefs/ufs/ffs/ffs_subr.c
index 5284fd8b96a..34bb5957867 100644
--- a/usr.sbin/makefs/ufs/ffs/ffs_subr.c
+++ b/usr.sbin/makefs/ufs/ffs/ffs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_subr.c,v 1.5 2016/10/16 22:26:34 tedu Exp $ */
+/* $OpenBSD: ffs_subr.c,v 1.6 2016/10/17 13:45:38 natano Exp $ */
/* $NetBSD: ffs_subr.c,v 1.49 2016/05/07 11:59:08 maxv Exp $ */
/*
@@ -39,10 +39,12 @@ extern const int inside[], around[];
extern const u_char * const fragtbl[];
#include <ufs/ffs/fs.h>
-#include <ufs/ffs/ffs_extern.h>
#include <ufs/ufs/ufs_bswap.h>
#include <ufs/ufs/dinode.h>
+
+#include "ffs/ffs_extern.h"
+
void panic(const char *, ...)
__attribute__((__noreturn__,__format__(__printf__,1,2)));