]>
Commit | Line | Data |
---|---|---|
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 | ||
21 | typedef int intgen_t; | |
89184fbc AG |
22 | typedef void jdm_fshandle_t; /* filesystem handle */ |
23 | typedef void jdm_filehandle_t; /* filehandle */ | |
2bd0ea18 NS |
24 | |
25 | struct xfs_bstat; | |
14290264 | 26 | struct attrlist_cursor; |
258b00ea | 27 | struct parent; |
89184fbc AG |
28 | |
29 | extern jdm_fshandle_t * | |
30 | jdm_getfshandle( char *mntpnt); | |
31 | ||
32 | extern void | |
33 | jdm_new_filehandle( jdm_filehandle_t **handlep, /* new filehandle */ | |
34 | size_t *hlen, /* new filehandle size */ | |
35 | jdm_fshandle_t *fshandlep, /* filesystem filehandle */ | |
36 | struct xfs_bstat *sp); /* bulkstat info */ | |
dfc130f3 | 37 | |
89184fbc AG |
38 | extern void |
39 | jdm_delete_filehandle( jdm_filehandle_t *handlep,/* filehandle to delete */ | |
40 | size_t hlen); /* filehandle size */ | |
41 | ||
42 | extern intgen_t | |
43 | jdm_open( jdm_fshandle_t *fshandlep, | |
44 | struct xfs_bstat *sp, | |
45 | intgen_t oflags); | |
46 | ||
47 | extern intgen_t | |
48 | jdm_readlink( jdm_fshandle_t *fshandlep, | |
49 | struct xfs_bstat *sp, | |
50 | char *bufp, | |
51 | size_t bufsz); | |
2bd0ea18 | 52 | |
14290264 NS |
53 | extern intgen_t |
54 | jdm_attr_multi( jdm_fshandle_t *fshp, | |
55 | xfs_bstat_t *statp, | |
56 | char *bufp, int rtrvcnt, int flags); | |
57 | ||
58 | extern intgen_t | |
59 | jdm_attr_list( jdm_fshandle_t *fshp, | |
60 | xfs_bstat_t *statp, | |
61 | char *bufp, size_t bufsz, int flags, | |
62 | struct attrlist_cursor *cursor); | |
63 | ||
258b00ea | 64 | extern int |
60ac13e8 | 65 | jdm_parents( jdm_fshandle_t *fshp, |
258b00ea TS |
66 | xfs_bstat_t *statp, |
67 | struct parent *bufp, size_t bufsz, | |
60ac13e8 | 68 | unsigned int *count); |
258b00ea TS |
69 | |
70 | extern int | |
60ac13e8 | 71 | jdm_parentpaths( jdm_fshandle_t *fshp, |
258b00ea TS |
72 | xfs_bstat_t *statp, |
73 | struct parent *bufp, size_t bufsz, | |
60ac13e8 | 74 | unsigned int *count); |
258b00ea | 75 | |
2bd0ea18 NS |
76 | /* macro for determining the size of a structure member */ |
77 | #define sizeofmember( t, m ) sizeof( ( ( t * )0 )->m ) | |
78 | ||
79 | /* macro for calculating the offset of a structure member */ | |
80 | #define offsetofmember( t, m ) ( ( size_t )( char * )&( ( ( t * )0 )->m ) ) | |
81 | ||
82 | #endif /* __JDM_H__ */ |