]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - include/jdm.h
Merge back recent changes from xfs kernel headers.
[thirdparty/xfsprogs-dev.git] / include / jdm.h
CommitLineData
2bd0ea18 1/*
f302e9e4
NS
2 * Copyright (c) 2000-2002, 2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
dfc130f3 4 *
f302e9e4
NS
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation.
dfc130f3 8 *
f302e9e4
NS
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
dfc130f3 13 *
f302e9e4
NS
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2bd0ea18
NS
17 */
18#ifndef __JDM_H__
19#define __JDM_H__
20
21typedef int intgen_t;
89184fbc
AG
22typedef void jdm_fshandle_t; /* filesystem handle */
23typedef void jdm_filehandle_t; /* filehandle */
2bd0ea18
NS
24
25struct xfs_bstat;
14290264 26struct attrlist_cursor;
89184fbc
AG
27
28extern jdm_fshandle_t *
29jdm_getfshandle( char *mntpnt);
30
31extern void
32jdm_new_filehandle( jdm_filehandle_t **handlep, /* new filehandle */
33 size_t *hlen, /* new filehandle size */
34 jdm_fshandle_t *fshandlep, /* filesystem filehandle */
35 struct xfs_bstat *sp); /* bulkstat info */
dfc130f3 36
89184fbc
AG
37extern void
38jdm_delete_filehandle( jdm_filehandle_t *handlep,/* filehandle to delete */
39 size_t hlen); /* filehandle size */
40
41extern intgen_t
42jdm_open( jdm_fshandle_t *fshandlep,
43 struct xfs_bstat *sp,
44 intgen_t oflags);
45
46extern intgen_t
47jdm_readlink( jdm_fshandle_t *fshandlep,
48 struct xfs_bstat *sp,
49 char *bufp,
50 size_t bufsz);
2bd0ea18 51
14290264
NS
52extern intgen_t
53jdm_attr_multi( jdm_fshandle_t *fshp,
54 xfs_bstat_t *statp,
55 char *bufp, int rtrvcnt, int flags);
56
57extern intgen_t
58jdm_attr_list( jdm_fshandle_t *fshp,
59 xfs_bstat_t *statp,
60 char *bufp, size_t bufsz, int flags,
61 struct attrlist_cursor *cursor);
62
2bd0ea18
NS
63/* macro for determining the size of a structure member */
64#define sizeofmember( t, m ) sizeof( ( ( t * )0 )->m )
65
66/* macro for calculating the offset of a structure member */
67#define offsetofmember( t, m ) ( ( size_t )( char * )&( ( ( t * )0 )->m ) )
68
69#endif /* __JDM_H__ */