diff options
author | Nathan Scott <nathans@sgi.com> | 2005-11-01 19:43:04 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-11-01 19:43:04 -0500 |
commit | 80cce77980c645b1c129d0e90159c1b1bb78f6a6 (patch) | |
tree | 1c7174a77f4b1fa6dee5b2384e137a62fa29cf1c | |
parent | f74dee42765db1c2ed584de7ac66aa619c40c79e (diff) |
[XFS] Make some extended attributes routines take const parameters, for
the FreeBSD porters.
SGI-PV: 942906
SGI-Modid: xfs-linux:xfs-kern:23845a
Signed-off-by: Nathan Scott <nathans@sgi.com>
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.h | 11 | ||||
-rw-r--r-- | fs/xfs/xfs_attr.c | 12 | ||||
-rw-r--r-- | fs/xfs/xfs_attr.h | 8 | ||||
-rw-r--r-- | fs/xfs/xfs_da_btree.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_da_btree.h | 4 |
5 files changed, 19 insertions, 18 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index 35f306cebb87..76a8dddb437a 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h | |||
@@ -216,11 +216,12 @@ typedef void (*vop_rwunlock_t)(bhv_desc_t *, vrwlock_t); | |||
216 | typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int, | 216 | typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int, |
217 | struct xfs_iomap *, int *); | 217 | struct xfs_iomap *, int *); |
218 | typedef int (*vop_reclaim_t)(bhv_desc_t *); | 218 | typedef int (*vop_reclaim_t)(bhv_desc_t *); |
219 | typedef int (*vop_attr_get_t)(bhv_desc_t *, char *, char *, int *, int, | 219 | typedef int (*vop_attr_get_t)(bhv_desc_t *, const char *, char *, int *, |
220 | struct cred *); | 220 | int, struct cred *); |
221 | typedef int (*vop_attr_set_t)(bhv_desc_t *, char *, char *, int, int, | 221 | typedef int (*vop_attr_set_t)(bhv_desc_t *, const char *, char *, int, |
222 | struct cred *); | 222 | int, struct cred *); |
223 | typedef int (*vop_attr_remove_t)(bhv_desc_t *, char *, int, struct cred *); | 223 | typedef int (*vop_attr_remove_t)(bhv_desc_t *, const char *, |
224 | int, struct cred *); | ||
224 | typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int, | 225 | typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int, |
225 | struct attrlist_cursor_kern *, struct cred *); | 226 | struct attrlist_cursor_kern *, struct cred *); |
226 | typedef void (*vop_link_removed_t)(bhv_desc_t *, vnode_t *, int); | 227 | typedef void (*vop_link_removed_t)(bhv_desc_t *, vnode_t *, int); |
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index c2939b8f8d24..c2c14b2103f1 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c | |||
@@ -122,7 +122,7 @@ ktrace_t *xfs_attr_trace_buf; | |||
122 | *========================================================================*/ | 122 | *========================================================================*/ |
123 | 123 | ||
124 | int | 124 | int |
125 | xfs_attr_fetch(xfs_inode_t *ip, char *name, int namelen, | 125 | xfs_attr_fetch(xfs_inode_t *ip, const char *name, int namelen, |
126 | char *value, int *valuelenp, int flags, struct cred *cred) | 126 | char *value, int *valuelenp, int flags, struct cred *cred) |
127 | { | 127 | { |
128 | xfs_da_args_t args; | 128 | xfs_da_args_t args; |
@@ -177,7 +177,7 @@ xfs_attr_fetch(xfs_inode_t *ip, char *name, int namelen, | |||
177 | } | 177 | } |
178 | 178 | ||
179 | int | 179 | int |
180 | xfs_attr_get(bhv_desc_t *bdp, char *name, char *value, int *valuelenp, | 180 | xfs_attr_get(bhv_desc_t *bdp, const char *name, char *value, int *valuelenp, |
181 | int flags, struct cred *cred) | 181 | int flags, struct cred *cred) |
182 | { | 182 | { |
183 | xfs_inode_t *ip = XFS_BHVTOI(bdp); | 183 | xfs_inode_t *ip = XFS_BHVTOI(bdp); |
@@ -201,7 +201,7 @@ xfs_attr_get(bhv_desc_t *bdp, char *name, char *value, int *valuelenp, | |||
201 | } | 201 | } |
202 | 202 | ||
203 | STATIC int | 203 | STATIC int |
204 | xfs_attr_set_int(xfs_inode_t *dp, char *name, int namelen, | 204 | xfs_attr_set_int(xfs_inode_t *dp, const char *name, int namelen, |
205 | char *value, int valuelen, int flags) | 205 | char *value, int valuelen, int flags) |
206 | { | 206 | { |
207 | xfs_da_args_t args; | 207 | xfs_da_args_t args; |
@@ -437,7 +437,7 @@ out: | |||
437 | } | 437 | } |
438 | 438 | ||
439 | int | 439 | int |
440 | xfs_attr_set(bhv_desc_t *bdp, char *name, char *value, int valuelen, int flags, | 440 | xfs_attr_set(bhv_desc_t *bdp, const char *name, char *value, int valuelen, int flags, |
441 | struct cred *cred) | 441 | struct cred *cred) |
442 | { | 442 | { |
443 | xfs_inode_t *dp; | 443 | xfs_inode_t *dp; |
@@ -469,7 +469,7 @@ xfs_attr_set(bhv_desc_t *bdp, char *name, char *value, int valuelen, int flags, | |||
469 | * Transitions attribute list from Btree to shortform as necessary. | 469 | * Transitions attribute list from Btree to shortform as necessary. |
470 | */ | 470 | */ |
471 | STATIC int | 471 | STATIC int |
472 | xfs_attr_remove_int(xfs_inode_t *dp, char *name, int namelen, int flags) | 472 | xfs_attr_remove_int(xfs_inode_t *dp, const char *name, int namelen, int flags) |
473 | { | 473 | { |
474 | xfs_da_args_t args; | 474 | xfs_da_args_t args; |
475 | xfs_fsblock_t firstblock; | 475 | xfs_fsblock_t firstblock; |
@@ -592,7 +592,7 @@ out: | |||
592 | } | 592 | } |
593 | 593 | ||
594 | int | 594 | int |
595 | xfs_attr_remove(bhv_desc_t *bdp, char *name, int flags, struct cred *cred) | 595 | xfs_attr_remove(bhv_desc_t *bdp, const char *name, int flags, struct cred *cred) |
596 | { | 596 | { |
597 | xfs_inode_t *dp; | 597 | xfs_inode_t *dp; |
598 | int namelen, error; | 598 | int namelen, error; |
diff --git a/fs/xfs/xfs_attr.h b/fs/xfs/xfs_attr.h index 45ab1c542baf..42648b4f75b3 100644 --- a/fs/xfs/xfs_attr.h +++ b/fs/xfs/xfs_attr.h | |||
@@ -172,15 +172,15 @@ struct xfs_da_args; | |||
172 | /* | 172 | /* |
173 | * Overall external interface routines. | 173 | * Overall external interface routines. |
174 | */ | 174 | */ |
175 | int xfs_attr_get(bhv_desc_t *, char *, char *, int *, int, struct cred *); | 175 | int xfs_attr_get(bhv_desc_t *, const char *, char *, int *, int, struct cred *); |
176 | int xfs_attr_set(bhv_desc_t *, char *, char *, int, int, struct cred *); | 176 | int xfs_attr_set(bhv_desc_t *, const char *, char *, int, int, struct cred *); |
177 | int xfs_attr_remove(bhv_desc_t *, char *, int, struct cred *); | 177 | int xfs_attr_remove(bhv_desc_t *, const char *, int, struct cred *); |
178 | int xfs_attr_list(bhv_desc_t *, char *, int, int, | 178 | int xfs_attr_list(bhv_desc_t *, char *, int, int, |
179 | struct attrlist_cursor_kern *, struct cred *); | 179 | struct attrlist_cursor_kern *, struct cred *); |
180 | int xfs_attr_inactive(struct xfs_inode *dp); | 180 | int xfs_attr_inactive(struct xfs_inode *dp); |
181 | 181 | ||
182 | int xfs_attr_shortform_getvalue(struct xfs_da_args *); | 182 | int xfs_attr_shortform_getvalue(struct xfs_da_args *); |
183 | int xfs_attr_fetch(struct xfs_inode *, char *, int, | 183 | int xfs_attr_fetch(struct xfs_inode *, const char *, int, |
184 | char *, int *, int, struct cred *); | 184 | char *, int *, int, struct cred *); |
185 | 185 | ||
186 | #endif /* __XFS_ATTR_H__ */ | 186 | #endif /* __XFS_ATTR_H__ */ |
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c index 8e2597b1a029..7e086c60485f 100644 --- a/fs/xfs/xfs_da_btree.c +++ b/fs/xfs/xfs_da_btree.c | |||
@@ -1604,7 +1604,7 @@ xfs_da_path_shift(xfs_da_state_t *state, xfs_da_state_path_t *path, | |||
1604 | * This is implemented with some source-level loop unrolling. | 1604 | * This is implemented with some source-level loop unrolling. |
1605 | */ | 1605 | */ |
1606 | xfs_dahash_t | 1606 | xfs_dahash_t |
1607 | xfs_da_hashname(uchar_t *name, int namelen) | 1607 | xfs_da_hashname(const uchar_t *name, int namelen) |
1608 | { | 1608 | { |
1609 | xfs_dahash_t hash; | 1609 | xfs_dahash_t hash; |
1610 | 1610 | ||
diff --git a/fs/xfs/xfs_da_btree.h b/fs/xfs/xfs_da_btree.h index 3a9b9e809c60..a2199578b4c0 100644 --- a/fs/xfs/xfs_da_btree.h +++ b/fs/xfs/xfs_da_btree.h | |||
@@ -168,7 +168,7 @@ int xfs_da_cookie_entry(struct xfs_mount *mp, xfs_off_t cookie); | |||
168 | * Structure to ease passing around component names. | 168 | * Structure to ease passing around component names. |
169 | */ | 169 | */ |
170 | typedef struct xfs_da_args { | 170 | typedef struct xfs_da_args { |
171 | uchar_t *name; /* string (maybe not NULL terminated) */ | 171 | const uchar_t *name; /* string (maybe not NULL terminated) */ |
172 | int namelen; /* length of string (maybe no NULL) */ | 172 | int namelen; /* length of string (maybe no NULL) */ |
173 | uchar_t *value; /* set of bytes (maybe contain NULLs) */ | 173 | uchar_t *value; /* set of bytes (maybe contain NULLs) */ |
174 | int valuelen; /* length of value */ | 174 | int valuelen; /* length of value */ |
@@ -314,7 +314,7 @@ xfs_daddr_t xfs_da_reada_buf(struct xfs_trans *trans, struct xfs_inode *dp, | |||
314 | int xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno, | 314 | int xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno, |
315 | xfs_dabuf_t *dead_buf); | 315 | xfs_dabuf_t *dead_buf); |
316 | 316 | ||
317 | uint xfs_da_hashname(uchar_t *name_string, int name_length); | 317 | uint xfs_da_hashname(const uchar_t *name_string, int name_length); |
318 | uint xfs_da_log2_roundup(uint i); | 318 | uint xfs_da_log2_roundup(uint i); |
319 | xfs_da_state_t *xfs_da_state_alloc(void); | 319 | xfs_da_state_t *xfs_da_state_alloc(void); |
320 | void xfs_da_state_free(xfs_da_state_t *state); | 320 | void xfs_da_state_free(xfs_da_state_t *state); |