4
* Function prototypes, macros, etc. for related 'C' files
6
* Copyright (C) 2006 Oracle. All rights reserved.
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
18
* You should have received a copy of the GNU General Public
19
* License along with this program; if not, write to the
20
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
* Boston, MA 021110-1307, USA.
34
#include <sys/types.h>
41
#include <sys/socket.h>
42
#include <netinet/in.h>
43
#include <arpa/inet.h>
44
#include <netinet/in.h>
47
#include <linux/kdev_t.h>
52
#include <linux/types.h>
56
#include "ocfs1_fs_compat.h"
58
#define FSWRK_FATAL(fmt, arg...) ({ fprintf(stderr, "ERROR at %s, %d: " fmt ". EXITING!!!\n", \
59
__FILE__, __LINE__, ##arg); \
64
#define FSWRK_COM_FATAL(__p, __r) do { com_err(__p, __r, "(%s,%d)", __FILE__, __LINE__); raise (SIGTERM); exit(1); } while(0)
66
#define FSWRK_FATAL_STR(str) FSWRK_FATAL(str, "")
68
#define FSWRK_WARN(fmt, arg...) fprintf(stderr, "WARNING at %s, %d: " fmt ".\n", \
69
__FILE__, __LINE__, ##arg)
71
#define FSWRK_WARN_STR(str) FSWRK_WARN(str, "")
74
#define max(a,b) ((a) > (b) ? (a) : (b))
76
#define min(a,b) ((a) < (b) ? (a) : (b))
79
CORRUPT_EXTENT_BLOCK = 13,
86
CORRUPT_CHAIN_GROUP_MAGIC,
88
CORRUPT_SUPERBLOCK_CLUSTERS_EXCESS,
89
CORRUPT_SUPERBLOCK_CLUSTERS_LACK,
91
CORRUPT_GROUP_GENERATION,
94
CORRUPT_INODE_NOT_CONNECTED,
95
CORRUPT_INODE_ORPHANED,
96
CORRUPT_INODE_ALLOC_REPAIR,
97
CORRUPT_LOCAL_ALLOC_EMPTY,
98
CORRUPT_LOCAL_ALLOC_BITMAP,
99
CORRUPT_LOCAL_ALLOC_USED,
100
CORRUPT_TRUNCATE_LOG_LIST,
101
CORRUPT_TRUNCATE_LOG_REC,
103
CORRUPT_SPECIAL_FILE,
107
CORRUPT_DIR_PARENT_DUP,
108
CORRUPT_DIR_NOT_CONNECTED,
109
CORRUPT_CLUSTER_AND_GROUP_DESC,
114
#define ARRAY_ELEMENTS(arr) (sizeof(arr) / sizeof(arr[0]))
116
/* remaining headers */
122
#include <local_alloc.h>
123
#include <truncate_log.h>
127
#include <fsck_type.h>
129
#endif /* __MAIN_H__ */