/*
- * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
+ * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ *
+ * 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.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
+ *
+ * This program is distributed in the hope that it would 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 the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
typedef enum fldt {
FLDT_AGBLOCKNZ,
FLDT_AGF,
FLDT_AGFL,
+ FLDT_AGFL_CRC,
FLDT_AGI,
FLDT_AGINO,
FLDT_AGINONN,
FLDT_AGNUMBER,
+
+ /* attr fields */
FLDT_ATTR,
FLDT_ATTR_BLKINFO,
FLDT_ATTR_LEAF_ENTRY,
FLDT_ATTR_SF_HDR,
FLDT_ATTRBL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LDT_DIR2SF,
- FLDT_DIR_BLKINFO,
- FLDT_DIR_INO,
- FLDT_DIR_LEAF_ENTRY,
- FLDT_DIR_LEAF_HDR,
- FLDT_DIR_LEAF_MAP,
- FLDT_DIR_LEAF_NAME,
- FLDT_DIR_NODE_ENTRY,
- FLDT_DIR_NODE_HDR,
- FLDT_DIR_SF_ENTRY,
- FLDT_DIR_SF_HDR,
+
+ /* dir v3 fields */
+ FLDT_DIR3,
+ FLDT_DIR3_BLKHDR,
+ FLDT_DIR3_DATA_HDR,
+ FLDT_DIR3_FREE_HDR,
+ FLDT_DIR3_LEAF_HDR,
+ FLDT_DIR3_DATA_UNION,
+ FLDT_DIR3_SF_ENTRY,
+ FLDT_DIR3SF,
+
+ /* dir v2/3 node fields */
+ FLDT_DA_BLKINFO,
+ FLDT_DA_NODE_ENTRY,
+ FLDT_DA_NODE_HDR,
+ FLDT_DA3_BLKINFO,
+ FLDT_DA3_NODE_HDR,
+
FLDT_DIRBLOCK,
- FLDT_DIRSHORT,
FLDT_DISK_DQUOT,
FLDT_DQBLK,
FLDT_DQID,
FLDT_FSIZE,
FLDT_INO,
FLDT_INOBT,
+ FLDT_INOBT_CRC,
+ FLDT_INOBT_SPCRC,
FLDT_INOBTKEY,
FLDT_INOBTPTR,
FLDT_INOBTREC,
+ FLDT_INOBTSPREC,
FLDT_INODE,
+ FLDT_INODE_CRC,
FLDT_INOFREE,
FLDT_INT16D,
FLDT_INT32D,
FLDT_QCNT,
FLDT_QWARNCNT,
FLDT_SB,
+
+ /* CRC enabled symlink */
+ FLDT_SYMLINK_CRC,
+
FLDT_TIME,
FLDT_TIMESTAMP,
FLDT_UINT1,
} fldt_t;
typedef int (*offset_fnc_t)(void *obj, int startoff, int idx);
-#define OI(o) ((offset_fnc_t)(__psint_t)(o))
+#define OI(o) ((offset_fnc_t)(intptr_t)(o))
typedef int (*count_fnc_t)(void *obj, int startoff);
-#define CI(c) ((count_fnc_t)(__psint_t)(c))
+#define CI(c) ((count_fnc_t)(intptr_t)(c))
#define C1 CI(1)
typedef struct field
#define FLD_COUNT 16 /* count value is a function pointer */
typedef int (*size_fnc_t)(void *obj, int startoff, int idx);
-#define SI(s) ((size_fnc_t)(__psint_t)(s))
+#define SI(s) ((size_fnc_t)(intptr_t)(s))
typedef struct ftattr
{
int idx);
extern int fcount(const field_t *f, void *obj, int startoff);
extern const field_t *findfield(char *name, const field_t *fields,
- void *obj, int startoff);
+ void *obj, int startoff);
extern int fsize(const field_t *f, void *obj, int startoff,
- int idx);
+ int idx);