2
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
2
* Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
4
4
* This program is free software; you can redistribute it and/or modify it
5
5
* under the terms of version 2 of the GNU General Public License as
6
6
* published by the Free Software Foundation.
8
8
* This program is distributed in the hope that it would be useful, but
9
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
12
* Further, this software is distributed without any warranty that it is
13
13
* free of the rightful claim of any third person regarding infringement
14
14
* or the like. Any license provided herein, whether implied or
15
15
* otherwise, applies only to this software file. Patent licenses, if
16
16
* any, provided herein do not apply to combinations of this program with
17
17
* other software, or any other product whatsoever.
19
19
* You should have received a copy of the GNU General Public License along
20
20
* with this program; if not, write the Free Software Foundation, Inc., 59
21
21
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
23
23
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24
24
* Mountain View, CA 94043, or:
28
* For further information regarding this notice, see:
28
* For further information regarding this notice, see:
30
30
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
32
32
#ifndef __XFS_DIR2_SF_H__
63
62
#define XFS_DIR2_SF_GET_INO8_ARCH(di,arch) \
64
63
(xfs_ino_t)(DIRINO_GET_ARCH(&di,arch))
65
64
#define XFS_DIR2_SF_GET_INO8(di) \
66
XFS_DIR2_SF_GET_INO8_ARCH(di,ARCH_NOCONVERT)
65
XFS_DIR2_SF_GET_INO8_ARCH(di,ARCH_NOCONVERT)
69
68
* Inode number stored as 4 8-bit values.
135
134
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_GET_INUMBER)
136
xfs_intino_t xfs_dir2_sf_get_inumber_arch(xfs_dir2_sf_t *sfp, xfs_dir2_inou_t *from,
135
xfs_intino_t xfs_dir2_sf_get_inumber_arch(xfs_dir2_sf_t *sfp, xfs_dir2_inou_t *from,
138
137
#define XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, from, arch) \
139
138
xfs_dir2_sf_get_inumber_arch(sfp, from, arch)
148
147
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_PUT_INUMBER)
149
148
void xfs_dir2_sf_put_inumber_arch(xfs_dir2_sf_t *sfp, xfs_ino_t *from,
150
xfs_dir2_inou_t *to, xfs_arch_t arch);
149
xfs_dir2_inou_t *to, xfs_arch_t arch);
151
150
#define XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp,from,to,arch) \
152
151
xfs_dir2_sf_put_inumber_arch(sfp,from,to,arch)
154
153
#define XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp,from,to,arch) \
155
154
if ((sfp)->hdr.i8count == 0) { \
156
DIRINO4_COPY_ARCH(from,to,arch); \
158
DIRINO_COPY_ARCH(from,to,arch); \
155
DIRINO4_COPY_ARCH(from,to,arch); \
157
DIRINO_COPY_ARCH(from,to,arch); \
162
161
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_GET_OFFSET)
163
xfs_dir2_data_aoff_t xfs_dir2_sf_get_offset_arch(xfs_dir2_sf_entry_t *sfep,
162
xfs_dir2_data_aoff_t xfs_dir2_sf_get_offset_arch(xfs_dir2_sf_entry_t *sfep,
165
164
xfs_dir2_data_aoff_t xfs_dir2_sf_get_offset(xfs_dir2_sf_entry_t *sfep);
166
165
#define XFS_DIR2_SF_GET_OFFSET_ARCH(sfep,arch) \
167
xfs_dir2_sf_get_offset_arch(sfep,arch)
166
xfs_dir2_sf_get_offset_arch(sfep,arch)
169
168
#define XFS_DIR2_SF_GET_OFFSET_ARCH(sfep,arch) \
170
INT_GET_UNALIGNED_16_ARCH(&(sfep)->offset.i,arch)
169
INT_GET_UNALIGNED_16_ARCH(&(sfep)->offset.i,arch)
173
172
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_PUT_OFFSET)
174
173
void xfs_dir2_sf_put_offset_arch(xfs_dir2_sf_entry_t *sfep,
175
xfs_dir2_data_aoff_t off, xfs_arch_t arch);
174
xfs_dir2_data_aoff_t off, xfs_arch_t arch);
176
175
#define XFS_DIR2_SF_PUT_OFFSET_ARCH(sfep,off,arch) \
177
xfs_dir2_sf_put_offset_arch(sfep,off,arch)
176
xfs_dir2_sf_put_offset_arch(sfep,off,arch)
179
178
#define XFS_DIR2_SF_PUT_OFFSET_ARCH(sfep,off,arch) \
180
INT_SET_UNALIGNED_16_ARCH(&(sfep)->offset.i,off,arch)
179
INT_SET_UNALIGNED_16_ARCH(&(sfep)->offset.i,off,arch)
183
182
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_ENTSIZE_BYNAME)