diff options
author | natano <natano@openbsd.org> | 2016-10-17 07:54:17 +0000 |
---|---|---|
committer | natano <natano@openbsd.org> | 2016-10-17 07:54:17 +0000 |
commit | 1c2618c5b56ad2fa7232f7b538f22d9d8a237115 (patch) | |
tree | 4a415e4f0bbe5d003e47cc4589b926cf25ced2b3 /usr.sbin/makefs | |
parent | Remove the -d option. (diff) | |
download | wireguard-openbsd-1c2618c5b56ad2fa7232f7b538f22d9d8a237115.tar.xz wireguard-openbsd-1c2618c5b56ad2fa7232f7b538f22d9d8a237115.zip |
Remove "feature" defines. This code won't try to be portable when we are
done hacking it.
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r-- | usr.sbin/makefs/ffs.c | 32 | ||||
-rw-r--r-- | usr.sbin/makefs/makefs.h | 8 | ||||
-rw-r--r-- | usr.sbin/makefs/walk.c | 4 |
3 files changed, 4 insertions, 40 deletions
diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c index ca456847021..c15331d13dd 100644 --- a/usr.sbin/makefs/ffs.c +++ b/usr.sbin/makefs/ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs.c,v 1.8 2016/10/17 01:16:22 tedu Exp $ */ +/* $OpenBSD: ffs.c,v 1.9 2016/10/17 07:54:17 natano Exp $ */ /* $NetBSD: ffs.c,v 1.66 2015/12/21 00:58:08 christos Exp $ */ /* @@ -81,10 +81,6 @@ #include "makefs.h" #include "ffs.h" -#if HAVE_STRUCT_STATVFS_F_IOSIZE && HAVE_FSTATVFS -#include <sys/statvfs.h> -#endif - #include <ufs/ufs/dinode.h> #include <ufs/ufs/dir.h> #include <ufs/ffs/fs.h> @@ -447,9 +443,6 @@ ffs_dump_fsinfo(fsinfo_t *f) static int ffs_create_image(const char *image, fsinfo_t *fsopts) { -#if HAVE_STRUCT_STATVFS_F_IOSIZE && HAVE_FSTATVFS - struct statvfs sfs; -#endif struct fs *fs; char *buf; int i, bufsize; @@ -469,16 +462,7 @@ ffs_create_image(const char *image, fsinfo_t *fsopts) } /* zero image */ -#if HAVE_STRUCT_STATVFS_F_IOSIZE && HAVE_FSTATVFS - if (fstatvfs(fsopts->fd, &sfs) == -1) { -#endif - bufsize = 8192; -#if HAVE_STRUCT_STATVFS_F_IOSIZE && HAVE_FSTATVFS - warn("can't fstatvfs `%s', using default %d byte chunk", - image, bufsize); - } else - bufsize = sfs.f_iosize; -#endif + bufsize = 8192; bufrem = fsopts->size; if (fsopts->offset != 0) @@ -630,23 +614,17 @@ ffs_build_dinode1(struct ufs1_dinode *dinp, dirbuf_t *dbufp, fsnode *cur, dinp->di_mode = cur->inode->st.st_mode; dinp->di_nlink = cur->inode->nlink; dinp->di_size = cur->inode->st.st_size; -#if HAVE_STRUCT_STAT_ST_FLAGS dinp->di_flags = cur->inode->st.st_flags; -#endif -#if HAVE_STRUCT_STAT_ST_GEN dinp->di_gen = cur->inode->st.st_gen; -#endif dinp->di_uid = cur->inode->st.st_uid; dinp->di_gid = cur->inode->st.st_gid; dinp->di_atime = st->st_atime; dinp->di_mtime = st->st_mtime; dinp->di_ctime = st->st_ctime; -#if HAVE_STRUCT_STAT_ST_MTIMENSEC dinp->di_atimensec = st->st_atimensec; dinp->di_mtimensec = st->st_mtimensec; dinp->di_ctimensec = st->st_ctimensec; -#endif /* not set: di_db, di_ib, di_blocks, di_spare */ membuf = NULL; @@ -680,23 +658,17 @@ ffs_build_dinode2(struct ufs2_dinode *dinp, dirbuf_t *dbufp, fsnode *cur, dinp->di_mode = cur->inode->st.st_mode; dinp->di_nlink = cur->inode->nlink; dinp->di_size = cur->inode->st.st_size; -#if HAVE_STRUCT_STAT_ST_FLAGS dinp->di_flags = cur->inode->st.st_flags; -#endif -#if HAVE_STRUCT_STAT_ST_GEN dinp->di_gen = cur->inode->st.st_gen; -#endif dinp->di_uid = cur->inode->st.st_uid; dinp->di_gid = cur->inode->st.st_gid; dinp->di_atime = st->st_atime; dinp->di_mtime = st->st_mtime; dinp->di_ctime = st->st_ctime; -#if HAVE_STRUCT_STAT_ST_MTIMENSEC dinp->di_atimensec = st->st_atimensec; dinp->di_mtimensec = st->st_mtimensec; dinp->di_ctimensec = st->st_ctimensec; -#endif /* not set: di_db, di_ib, di_blocks, di_spare */ membuf = NULL; diff --git a/usr.sbin/makefs/makefs.h b/usr.sbin/makefs/makefs.h index faf5f51ca4e..3dcf137af52 100644 --- a/usr.sbin/makefs/makefs.h +++ b/usr.sbin/makefs/makefs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: makefs.h,v 1.5 2016/10/16 21:59:28 tedu Exp $ */ +/* $OpenBSD: makefs.h,v 1.6 2016/10/17 07:54:17 natano Exp $ */ /* $NetBSD: makefs.h,v 1.36 2015/11/25 00:48:49 christos Exp $ */ /* @@ -39,12 +39,6 @@ #ifndef _MAKEFS_H #define _MAKEFS_H -#define HAVE_STRUCT_STAT_ST_FLAGS 1 -#define HAVE_STRUCT_STAT_ST_GEN 1 -#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1 -#define HAVE_STRUCT_STATVFS_F_IOSIZE 0 -#define HAVE_FSTATVFS 1 - #include <sys/stat.h> #include <err.h> diff --git a/usr.sbin/makefs/walk.c b/usr.sbin/makefs/walk.c index eb69b4a834e..fd1dc11c82d 100644 --- a/usr.sbin/makefs/walk.c +++ b/usr.sbin/makefs/walk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: walk.c,v 1.4 2016/10/16 20:45:07 natano Exp $ */ +/* $OpenBSD: walk.c,v 1.5 2016/10/17 07:54:17 natano Exp $ */ /* $NetBSD: walk.c,v 1.29 2015/11/25 00:48:49 christos Exp $ */ /* @@ -223,11 +223,9 @@ create_fsnode(const char *root, const char *path, const char *name, cur->inode->st.st_atime = stampst.st_atime; cur->inode->st.st_mtime = stampst.st_mtime; cur->inode->st.st_ctime = stampst.st_ctime; -#if HAVE_STRUCT_STAT_ST_MTIMENSEC cur->inode->st.st_atimensec = stampst.st_atimensec; cur->inode->st.st_mtimensec = stampst.st_mtimensec; cur->inode->st.st_ctimensec = stampst.st_ctimensec; -#endif } return (cur); } |