sbin/hammer: Cleanup header includes
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 23 Sep 2017 20:06:17 +0000 (23:06 +0300)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 24 Sep 2017 11:24:45 +0000 (14:24 +0300)
14 files changed:
sbin/hammer/cmd_blockmap.c
sbin/hammer/cmd_cleanup.c
sbin/hammer/cmd_dedup.c
sbin/hammer/cmd_info.c
sbin/hammer/cmd_pfs.c
sbin/hammer/cmd_recover.c
sbin/hammer/cmd_show.c
sbin/hammer/cmd_stats.c
sbin/hammer/hammer.c
sbin/hammer/hammer.h
sbin/hammer/hammer_util.h
sbin/hammer/ondisk.c
sbin/hammer/uuid.c
sbin/newfs_hammer/newfs_hammer.c

index 8096ff7..c85259f 100644 (file)
@@ -36,6 +36,8 @@
 
 #include "hammer.h"
 
+#include <sys/tree.h>
+
 /*
  * Each collect covers 1<<(19+23) bytes address space of layer 1.
  * (plus a copy of 1<<23 bytes that holds layer2 entries in layer 1).
index a834647..87b1585 100644 (file)
  * (/var/hammer/root for root mount).
  */
 
-#include <libutil.h>
-
 #include "hammer.h"
 
+#include <libutil.h>
+
 struct didpfs {
        struct didpfs *next;
        hammer_uuid_t uuid;
index da58e31..c051d75 100644 (file)
  * SUCH DAMAGE.
  */
 
+#include "hammer.h"
+
+#include <sys/tree.h>
 #include <libutil.h>
 #include <crypto/sha2/sha2.h>
 
-#include "hammer.h"
-
 #define DEDUP_BUF (64 * 1024)
 
 /* Sorted list of block CRCs - light version for dedup-simulate */
index 9b180f4..6082ce8 100644 (file)
  *
  */
 
+#include "hammer.h"
+
 #include <libutil.h>
 #include <libhammer.h>
 
-#include "hammer.h"
-
 void show_info(char *path);
 static double percent(int64_t value, int64_t total);
 
index 675dbd4..235c071 100644 (file)
@@ -34,8 +34,6 @@
  * $DragonFly: src/sbin/hammer/cmd_pseudofs.c,v 1.12 2008/10/08 21:01:54 thomas Exp $
  */
 
-#include <libgen.h>
-
 #include "hammer.h"
 
 static int scanpfsid(struct hammer_ioc_pseudofs_rw *pfs, const char *path);
index c15f518..5c805f8 100644 (file)
@@ -34,6 +34,8 @@
 
 #include "hammer.h"
 
+#include <sys/tree.h>
+
 struct recover_dict {
        struct recover_dict *next;
        struct recover_dict *parent;
index c40ef9c..d2d0237 100644 (file)
  * SUCH DAMAGE.
  */
 
-#include <libutil.h>
-
 #include "hammer.h"
 
+#include <sys/tree.h>
+#include <libutil.h>
+
 #define FLAG_TOOFARLEFT                0x0001
 #define FLAG_TOOFARRIGHT       0x0002
 #define FLAG_BADTYPE           0x0004
index d90adbd..d275896 100644 (file)
  * $DragonFly: src/sbin/hammer/cmd_stats.c,v 1.3 2008/07/14 20:28:07 dillon Exp $
  */
 
+#include "hammer.h"
+
 #include <sys/sysctl.h>
 #include <math.h>
 
-#include "hammer.h"
-
 static void loaddelay(struct timespec *ts, const char *arg);
 
 #define _HAMMER "vfs.hammer.stats_"
index 79923b4..6472a5b 100644 (file)
@@ -34,6 +34,8 @@
 
 #include "hammer.h"
 
+#include <fstab.h>
+
 static void hammer_parse_blkdevs(const char *blkdevs, int oflags);
 static void __hammer_parse_blkdevs(const char *blkdevs, int oflags,
                int verify_volume, int verify_count);
index 3e08082..ed29eeb 100644 (file)
 #ifndef HAMMER_HAMMER_H_
 #define HAMMER_HAMMER_H_
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/mount.h>
-#include <sys/wait.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <fstab.h>
-#include <assert.h>
-#include <err.h>
-#include <ctype.h>
-#include <limits.h>
-#include <time.h>
-#include <signal.h>
-#include <dirent.h>
-#include <uuid.h>
-
 #include "hammer_util.h"
 
 /*
index 73c975b..7fca56b 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/time.h>
-#include <sys/tree.h>
 #include <sys/queue.h>
 #include <sys/mount.h>
+#include <sys/wait.h>
 
-#include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#include <string.h>
-#include <unistd.h>
 #include <stddef.h>
-#include <err.h>
+#include <string.h>
+#include <ctype.h>
+#include <dirent.h>
 #include <errno.h>
+#include <err.h>
 #include <fcntl.h>
+#include <libgen.h>
+#include <limits.h>
+#include <signal.h>
+#include <time.h>
+#include <unistd.h>
+#include <assert.h>
 
 #include <vfs/hammer/hammer_disk.h>
 #include <vfs/hammer/hammer_ioctl.h>
 #include <vfs/hammer/hammer_crc.h>
-#include <uuid.h>
 
 #define HAMMER_BUFLISTS                64
 #define HAMMER_BUFLISTMASK     (HAMMER_BUFLISTS - 1)
index d1e6b2f..59b75fa 100644 (file)
  * SUCH DAMAGE.
  */
 
+#include "hammer_util.h"
+
 #include <sys/diskslice.h>
 #include <sys/diskmbr.h>
 
-#include "hammer_util.h"
-
 static void check_volume(volume_info_t volume);
 static void get_buffer_readahead(buffer_info_t base);
 static __inline int readhammervol(volume_info_t volume);
index 984db88..b839255 100644 (file)
@@ -37,6 +37,8 @@
 
 #include "hammer_util.h"
 
+#include <uuid.h>
+
 void hammer_uuid_create(hammer_uuid_t *uuid)
 {
        uuid_create(uuid, NULL);
index 3e84f02..0d68d01 100644 (file)
  * SUCH DAMAGE.
  */
 
+#include "hammer_util.h"
+
 #include <sys/sysctl.h>
 #include <sys/ioctl_compat.h>
 
-#include "hammer_util.h"
-
 static int64_t getsize(const char *str, int pw);
 static int trim_volume(volume_info_t volume);
 static void format_volume(volume_info_t volume, int nvols,const char *label);