From 5cbc1267e5dc42149eeb07883f5f6239d22388e9 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 21 Aug 2019 13:52:53 +0200 Subject: Rename difftool.h to sqfsdiff.h Signed-off-by: David Oberhollenzer --- difftool/Makemodule.am | 2 +- difftool/compare_dir.c | 2 +- difftool/compare_files.c | 2 +- difftool/difftool.h | 55 ------------------------------------------------ difftool/extract.c | 2 +- difftool/node_compare.c | 2 +- difftool/sqfsdiff.c | 2 +- difftool/sqfsdiff.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ difftool/super.c | 2 +- difftool/util.c | 2 +- 10 files changed, 63 insertions(+), 63 deletions(-) delete mode 100644 difftool/difftool.h create mode 100644 difftool/sqfsdiff.h diff --git a/difftool/Makemodule.am b/difftool/Makemodule.am index 293143e..e687cb0 100644 --- a/difftool/Makemodule.am +++ b/difftool/Makemodule.am @@ -1,4 +1,4 @@ -sqfsdiff_SOURCES = difftool/sqfsdiff.c difftool/difftool.h difftool/util.c +sqfsdiff_SOURCES = difftool/sqfsdiff.c difftool/sqfsdiff.h difftool/util.c sqfsdiff_SOURCES += difftool/compare_dir.c difftool/node_compare.c sqfsdiff_SOURCES += difftool/compare_files.c difftool/super.c sqfsdiff_SOURCES += difftool/extract.c diff --git a/difftool/compare_dir.c b/difftool/compare_dir.c index cc3f8bc..7f4d00f 100644 --- a/difftool/compare_dir.c +++ b/difftool/compare_dir.c @@ -4,7 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer */ -#include "difftool.h" +#include "sqfsdiff.h" int compare_dir_entries(tree_node_t *old, tree_node_t *new) { diff --git a/difftool/compare_files.c b/difftool/compare_files.c index 04749c3..46e170b 100644 --- a/difftool/compare_files.c +++ b/difftool/compare_files.c @@ -4,7 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer */ -#include "difftool.h" +#include "sqfsdiff.h" static unsigned char old_buf[MAX_WINDOW_SIZE]; static unsigned char new_buf[MAX_WINDOW_SIZE]; diff --git a/difftool/difftool.h b/difftool/difftool.h deleted file mode 100644 index bf63faf..0000000 --- a/difftool/difftool.h +++ /dev/null @@ -1,55 +0,0 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later */ -/* - * difftool.h - * - * Copyright (C) 2019 David Oberhollenzer - */ -#ifndef DIFFTOOL_H -#define DIFFTOOL_H - -#include "config.h" - -#include "highlevel.h" -#include "fstree.h" -#include "util.h" - -#include -#include -#include -#include -#include -#include -#include - -#define MAX_WINDOW_SIZE (1024 * 1024 * 4) - -extern const char *old_path; -extern const char *new_path; -extern int compare_flags; -extern sqfs_reader_t sqfs_old; -extern sqfs_reader_t sqfs_new; -extern bool old_is_dir; -extern bool new_is_dir; - -enum { - COMPARE_NO_PERM = 0x01, - COMPARE_NO_OWNER = 0x02, - COMPARE_NO_CONTENTS = 0x04, - COMPARE_TIMESTAMP = 0x08, - COMPARE_INODE_NUM = 0x10, - COMPARE_EXTRACT_FILES = 0x20, -}; - -int compare_dir_entries(tree_node_t *a, tree_node_t *b); - -char *node_path(tree_node_t *n); - -int compare_files(file_info_t *a, file_info_t *b, const char *path); - -int node_compare(tree_node_t *a, tree_node_t *b); - -int compare_super_blocks(const sqfs_super_t *a, const sqfs_super_t *b); - -int extract_files(file_info_t *a, file_info_t *b, const char *path); - -#endif /* DIFFTOOL_H */ diff --git a/difftool/extract.c b/difftool/extract.c index 7d4fc1c..f40de60 100644 --- a/difftool/extract.c +++ b/difftool/extract.c @@ -4,7 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer */ -#include "difftool.h" +#include "sqfsdiff.h" static int extract(data_reader_t *data, file_info_t *fi, const char *path, char prefix) diff --git a/difftool/node_compare.c b/difftool/node_compare.c index 2e1cec6..1c68ab2 100644 --- a/difftool/node_compare.c +++ b/difftool/node_compare.c @@ -4,7 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer */ -#include "difftool.h" +#include "sqfsdiff.h" int node_compare(tree_node_t *a, tree_node_t *b) { diff --git a/difftool/sqfsdiff.c b/difftool/sqfsdiff.c index a065a8f..ddc2686 100644 --- a/difftool/sqfsdiff.c +++ b/difftool/sqfsdiff.c @@ -4,7 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer */ -#include "difftool.h" +#include "sqfsdiff.h" static struct option long_opts[] = { { "old", required_argument, NULL, 'a' }, diff --git a/difftool/sqfsdiff.h b/difftool/sqfsdiff.h new file mode 100644 index 0000000..f7d5139 --- /dev/null +++ b/difftool/sqfsdiff.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * sqfsdiff.h + * + * Copyright (C) 2019 David Oberhollenzer + */ +#ifndef DIFFTOOL_H +#define DIFFTOOL_H + +#include "config.h" + +#include "highlevel.h" +#include "fstree.h" +#include "util.h" + +#include +#include +#include +#include +#include +#include +#include + +#define MAX_WINDOW_SIZE (1024 * 1024 * 4) + +extern const char *old_path; +extern const char *new_path; +extern int compare_flags; +extern sqfs_reader_t sqfs_old; +extern sqfs_reader_t sqfs_new; +extern bool old_is_dir; +extern bool new_is_dir; + +enum { + COMPARE_NO_PERM = 0x01, + COMPARE_NO_OWNER = 0x02, + COMPARE_NO_CONTENTS = 0x04, + COMPARE_TIMESTAMP = 0x08, + COMPARE_INODE_NUM = 0x10, + COMPARE_EXTRACT_FILES = 0x20, +}; + +int compare_dir_entries(tree_node_t *a, tree_node_t *b); + +char *node_path(tree_node_t *n); + +int compare_files(file_info_t *a, file_info_t *b, const char *path); + +int node_compare(tree_node_t *a, tree_node_t *b); + +int compare_super_blocks(const sqfs_super_t *a, const sqfs_super_t *b); + +int extract_files(file_info_t *a, file_info_t *b, const char *path); + +#endif /* DIFFTOOL_H */ diff --git a/difftool/super.c b/difftool/super.c index 7bda728..0b75d9b 100644 --- a/difftool/super.c +++ b/difftool/super.c @@ -4,7 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer */ -#include "difftool.h" +#include "sqfsdiff.h" static const struct { uint16_t mask; diff --git a/difftool/util.c b/difftool/util.c index 64ee7d4..2883a2f 100644 --- a/difftool/util.c +++ b/difftool/util.c @@ -4,7 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer */ -#include "difftool.h" +#include "sqfsdiff.h" char *node_path(tree_node_t *n) { -- cgit v1.2.3