From 4efdf36026aa2c76ea8a0b8667598e49bde7b678 Mon Sep 17 00:00:00 2001 From: robi Date: Thu, 20 May 2010 00:15:01 +0000 Subject: Initial revision --- src/hard_link_stack.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/hard_link_stack.h (limited to 'src/hard_link_stack.h') 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 + +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 -- cgit v1.2.3