aboutsummaryrefslogtreecommitdiff
path: root/unpack
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-25 22:01:47 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-25 22:01:47 +0200
commit0ad74489aee8717d13b76a3cdf2ee00f5811bf9b (patch)
tree65cb052a3278a5efe795c0732d263198abc2e932 /unpack
parent37bf7752c31d8fda8faad0cf5f89328215305c60 (diff)
cleanup: remove some redundant header inclusions
The utility programs pretty much all have the same structure of including one central header per C file that includes all required library headers, so we can simply include config.h which we need for large file support from there and remove it from the C files. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'unpack')
-rw-r--r--unpack/describe.c4
-rw-r--r--unpack/list_files.c4
-rw-r--r--unpack/options.c2
-rw-r--r--unpack/rdsquashfs.c2
-rw-r--r--unpack/rdsquashfs.h1
-rw-r--r--unpack/restore_fstree.c2
6 files changed, 1 insertions, 14 deletions
diff --git a/unpack/describe.c b/unpack/describe.c
index cf5befd..be27857 100644
--- a/unpack/describe.c
+++ b/unpack/describe.c
@@ -1,10 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
-#include "config.h"
-
#include "rdsquashfs.h"
-#include <sys/sysmacros.h>
-
static void print_name(tree_node_t *n)
{
if (n->parent != NULL) {
diff --git a/unpack/list_files.c b/unpack/list_files.c
index 4038684..9c48d46 100644
--- a/unpack/list_files.c
+++ b/unpack/list_files.c
@@ -1,10 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
-#include "config.h"
-
#include "rdsquashfs.h"
-#include <sys/sysmacros.h>
-
static void mode_to_str(uint16_t mode, char *p)
{
switch (mode & S_IFMT) {
diff --git a/unpack/options.c b/unpack/options.c
index 0f0660e..c42f16a 100644
--- a/unpack/options.c
+++ b/unpack/options.c
@@ -1,6 +1,4 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
-#include "config.h"
-
#include "rdsquashfs.h"
static struct option long_opts[] = {
diff --git a/unpack/rdsquashfs.c b/unpack/rdsquashfs.c
index 2996668..4a0f12b 100644
--- a/unpack/rdsquashfs.c
+++ b/unpack/rdsquashfs.c
@@ -1,6 +1,4 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
-#include "config.h"
-
#include "rdsquashfs.h"
int main(int argc, char **argv)
diff --git a/unpack/rdsquashfs.h b/unpack/rdsquashfs.h
index aa051a2..ed882ff 100644
--- a/unpack/rdsquashfs.h
+++ b/unpack/rdsquashfs.h
@@ -13,6 +13,7 @@
#include "fstree.h"
#include "util.h"
+#include <sys/sysmacros.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/unpack/restore_fstree.c b/unpack/restore_fstree.c
index 8fb04d7..455e604 100644
--- a/unpack/restore_fstree.c
+++ b/unpack/restore_fstree.c
@@ -1,6 +1,4 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
-#include "config.h"
-
#include "rdsquashfs.h"
static int create_node(tree_node_t *n, data_reader_t *data, int flags)