]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - db/field.h
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
33 /* attr 3 specific fields */
38 FLDT_ATTR3_REMOTE_HDR
,
104 FLDT_DIR2_BLOCK_TAIL
,
108 FLDT_DIR2_DATA_OFFNZ
,
109 FLDT_DIR2_DATA_UNION
,
114 FLDT_DIR2_LEAF_ENTRY
,
128 FLDT_DIR3_DATA_UNION
,
132 /* dir v2/3 node fields */
168 /* CRC enabled symlink */
187 FLDT_ZZZ
/* mark last entry */
190 typedef int (*offset_fnc_t
)(void *obj
, int startoff
, int idx
);
191 #define OI(o) ((offset_fnc_t)(intptr_t)(o))
193 typedef int (*count_fnc_t
)(void *obj
, int startoff
);
194 #define CI(c) ((count_fnc_t)(intptr_t)(c))
210 #define FLD_ABASE1 1 /* field array base is 1 not 0 */
211 #define FLD_SKIPALL 2 /* skip this field in an all-fields print */
212 #define FLD_ARRAY 4 /* this field is an array */
213 #define FLD_OFFSET 8 /* offset value is a function pointer */
214 #define FLD_COUNT 16 /* count value is a function pointer */
216 typedef int (*size_fnc_t
)(void *obj
, int startoff
, int idx
);
217 #define SI(s) ((size_fnc_t)(intptr_t)(s))
219 typedef struct ftattr
228 const field_t
*subfld
;
230 extern const ftattr_t ftattrtab
[];
235 #define FTARG_SKIPZERO 1 /* skip 0 words */
236 #define FTARG_DONULL 2 /* make -1 words be "null" */
237 #define FTARG_SKIPNULL 4 /* skip -1 words */
238 #define FTARG_SIGNED 8 /* field value is signed */
239 #define FTARG_SIZE 16 /* size field is a function */
240 #define FTARG_SKIPNMS 32 /* skip printing names this time */
241 #define FTARG_OKEMPTY 64 /* ok if this (union type) is empty */
243 extern int bitoffset(const field_t
*f
, void *obj
, int startoff
,
245 extern int fcount(const field_t
*f
, void *obj
, int startoff
);
246 extern const field_t
*findfield(char *name
, const field_t
*fields
,
247 void *obj
, int startoff
);
248 extern int fsize(const field_t
*f
, void *obj
, int startoff
,