summaryrefslogtreecommitdiff
path: root/src/hard_link_stack.h
diff options
context:
space:
mode:
authorrobi <robi>2010-05-20 00:15:01 +0000
committerrobi <robi>2010-05-20 00:15:01 +0000
commit4efdf36026aa2c76ea8a0b8667598e49bde7b678 (patch)
treede14b911cf2fb2e77a8913b9fdce3c3348320ceb /src/hard_link_stack.h
Initial revision
Diffstat (limited to 'src/hard_link_stack.h')
-rw-r--r--src/hard_link_stack.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/hard_link_stack.h b/src/hard_link_stack.h
new file mode 100644
index 0000000..eea5ed7
--- /dev/null
+++ b/src/hard_link_stack.h
@@ -0,0 +1,49 @@
+/***************************************************************************
+ * Copyright (C) 2010 by Roberto Maar *
+ * robi@users.berlios.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+//construct for global collect of hardlinks
+
+#ifndef HARD_LINKSTACK_H
+#define HARD_LINKSTACK_H
+#include <ext2fs/ext2fs.h>
+
+struct link_entry{
+ ext2_ino_t inode_nr;
+ __u32 generation;
+ int link_count;
+ char* name;
+ struct link_entry* next;
+};
+
+struct link_stack_head{
+ __u32 count;
+ struct link_entry* begin;
+ struct link_entry* pointer;
+};
+
+
+void init_link_stack();
+void add_link_stack(ext2_ino_t , __u32, char*, __u32 );
+char* check_link_stack(ext2_ino_t, __u32);
+int match_link_stack(ext2_ino_t, __u32 );
+void clear_link_stack();
+
+
+#endif \ No newline at end of file