summaryrefslogtreecommitdiff
path: root/difftool/sqfsdiff.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-21 13:52:53 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-21 13:52:53 +0200
commit5cbc1267e5dc42149eeb07883f5f6239d22388e9 (patch)
tree450c2a644f05f9fccd9d24bada9029c0974ba6aa /difftool/sqfsdiff.h
parent851bb334c29a09e3ea706cc610c67667161165fa (diff)
Rename difftool.h to sqfsdiff.h
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'difftool/sqfsdiff.h')
-rw-r--r--difftool/sqfsdiff.h55
1 files changed, 55 insertions, 0 deletions
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 <goliath@infraroot.at>
+ */
+#ifndef DIFFTOOL_H
+#define DIFFTOOL_H
+
+#include "config.h"
+
+#include "highlevel.h"
+#include "fstree.h"
+#include "util.h"
+
+#include <sys/mman.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <getopt.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#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 */