]>
Commit | Line | Data |
---|---|---|
959ef981 | 1 | // SPDX-License-Identifier: LGPL-2.1 |
2bd0ea18 | 2 | /* |
f302e9e4 NS |
3 | * Copyright (c) 2000-2002, 2005 Silicon Graphics, Inc. |
4 | * All Rights Reserved. | |
2bd0ea18 NS |
5 | */ |
6 | #ifndef __JDM_H__ | |
7 | #define __JDM_H__ | |
8 | ||
9 | typedef int intgen_t; | |
89184fbc AG |
10 | typedef void jdm_fshandle_t; /* filesystem handle */ |
11 | typedef void jdm_filehandle_t; /* filehandle */ | |
2bd0ea18 NS |
12 | |
13 | struct xfs_bstat; | |
806c2658 | 14 | struct xfs_bulkstat; |
14290264 | 15 | struct attrlist_cursor; |
258b00ea | 16 | struct parent; |
89184fbc AG |
17 | |
18 | extern jdm_fshandle_t * | |
19 | jdm_getfshandle( char *mntpnt); | |
20 | ||
21 | extern void | |
22 | jdm_new_filehandle( jdm_filehandle_t **handlep, /* new filehandle */ | |
23 | size_t *hlen, /* new filehandle size */ | |
24 | jdm_fshandle_t *fshandlep, /* filesystem filehandle */ | |
25 | struct xfs_bstat *sp); /* bulkstat info */ | |
dfc130f3 | 26 | |
806c2658 DW |
27 | void jdm_new_filehandle_v5(jdm_filehandle_t **handlep, size_t *hlen, |
28 | jdm_fshandle_t *fshandlep, struct xfs_bulkstat *sp); | |
29 | ||
89184fbc AG |
30 | extern void |
31 | jdm_delete_filehandle( jdm_filehandle_t *handlep,/* filehandle to delete */ | |
32 | size_t hlen); /* filehandle size */ | |
33 | ||
34 | extern intgen_t | |
35 | jdm_open( jdm_fshandle_t *fshandlep, | |
36 | struct xfs_bstat *sp, | |
37 | intgen_t oflags); | |
38 | ||
806c2658 DW |
39 | intgen_t jdm_open_v5(jdm_fshandle_t *fshandlep, struct xfs_bulkstat *sp, |
40 | intgen_t oflags); | |
41 | ||
89184fbc AG |
42 | extern intgen_t |
43 | jdm_readlink( jdm_fshandle_t *fshandlep, | |
44 | struct xfs_bstat *sp, | |
45 | char *bufp, | |
46 | size_t bufsz); | |
2bd0ea18 | 47 | |
806c2658 DW |
48 | intgen_t jdm_readlink_v5(jdm_fshandle_t *fshandlep, struct xfs_bulkstat *sp, |
49 | char *bufp, size_t bufsz); | |
50 | ||
14290264 NS |
51 | extern intgen_t |
52 | jdm_attr_multi( jdm_fshandle_t *fshp, | |
b46789e2 | 53 | struct xfs_bstat *statp, |
14290264 NS |
54 | char *bufp, int rtrvcnt, int flags); |
55 | ||
806c2658 DW |
56 | intgen_t jdm_attr_multi_v5(jdm_fshandle_t *fshp, struct xfs_bulkstat *statp, |
57 | char *bufp, int rtrvcnt, int flags); | |
58 | ||
14290264 NS |
59 | extern intgen_t |
60 | jdm_attr_list( jdm_fshandle_t *fshp, | |
b46789e2 | 61 | struct xfs_bstat *statp, |
14290264 NS |
62 | char *bufp, size_t bufsz, int flags, |
63 | struct attrlist_cursor *cursor); | |
64 | ||
806c2658 DW |
65 | intgen_t jdm_attr_list_v5(jdm_fshandle_t *fshp, struct xfs_bulkstat *statp, |
66 | char *bufp, size_t bufsz, int flags, | |
67 | struct attrlist_cursor *cursor); | |
68 | ||
258b00ea | 69 | extern int |
60ac13e8 | 70 | jdm_parents( jdm_fshandle_t *fshp, |
b46789e2 | 71 | struct xfs_bstat *statp, |
258b00ea | 72 | struct parent *bufp, size_t bufsz, |
60ac13e8 | 73 | unsigned int *count); |
258b00ea | 74 | |
806c2658 DW |
75 | int jdm_parents_v5(jdm_fshandle_t *fshp, struct xfs_bulkstat *statp, |
76 | struct parent *bufp, size_t bufsz, unsigned int *count); | |
77 | ||
258b00ea | 78 | extern int |
60ac13e8 | 79 | jdm_parentpaths( jdm_fshandle_t *fshp, |
b46789e2 | 80 | struct xfs_bstat *statp, |
258b00ea | 81 | struct parent *bufp, size_t bufsz, |
60ac13e8 | 82 | unsigned int *count); |
258b00ea | 83 | |
806c2658 DW |
84 | int jdm_parentpaths_v5(jdm_fshandle_t *fshp, struct xfs_bulkstat *statp, |
85 | struct parent *bufp, size_t bufsz, unsigned int *count); | |
86 | ||
2bd0ea18 NS |
87 | /* macro for determining the size of a structure member */ |
88 | #define sizeofmember( t, m ) sizeof( ( ( t * )0 )->m ) | |
89 | ||
90 | /* macro for calculating the offset of a structure member */ | |
91 | #define offsetofmember( t, m ) ( ( size_t )( char * )&( ( ( t * )0 )->m ) ) | |
92 | ||
93 | #endif /* __JDM_H__ */ |