Commit 80cce779 authored by Nathan Scott's avatar Nathan Scott

[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: default avatarNathan Scott <nathans@sgi.com>
parent f74dee42
...@@ -216,11 +216,12 @@ typedef void (*vop_rwunlock_t)(bhv_desc_t *, vrwlock_t); ...@@ -216,11 +216,12 @@ typedef void (*vop_rwunlock_t)(bhv_desc_t *, vrwlock_t);
typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int, typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int,
struct xfs_iomap *, int *); struct xfs_iomap *, int *);
typedef int (*vop_reclaim_t)(bhv_desc_t *); typedef int (*vop_reclaim_t)(bhv_desc_t *);
typedef int (*vop_attr_get_t)(bhv_desc_t *, char *, char *, int *, int, typedef int (*vop_attr_get_t)(bhv_desc_t *, const char *, char *, int *,
struct cred *); int, struct cred *);
typedef int (*vop_attr_set_t)(bhv_desc_t *, char *, char *, int, int, typedef int (*vop_attr_set_t)(bhv_desc_t *, const char *, char *, int,
struct cred *); int, struct cred *);
typedef int (*vop_attr_remove_t)(bhv_desc_t *, char *, int, struct cred *); typedef int (*vop_attr_remove_t)(bhv_desc_t *, const char *,
int, struct cred *);
typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int, typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int,
struct attrlist_cursor_kern *, struct cred *); struct attrlist_cursor_kern *, struct cred *);
typedef void (*vop_link_removed_t)(bhv_desc_t *, vnode_t *, int); typedef void (*vop_link_removed_t)(bhv_desc_t *, vnode_t *, int);
......
...@@ -122,7 +122,7 @@ ktrace_t *xfs_attr_trace_buf; ...@@ -122,7 +122,7 @@ ktrace_t *xfs_attr_trace_buf;
*========================================================================*/ *========================================================================*/
int int
xfs_attr_fetch(xfs_inode_t *ip, char *name, int namelen, xfs_attr_fetch(xfs_inode_t *ip, const char *name, int namelen,
char *value, int *valuelenp, int flags, struct cred *cred) char *value, int *valuelenp, int flags, struct cred *cred)
{ {
xfs_da_args_t args; xfs_da_args_t args;
...@@ -177,7 +177,7 @@ xfs_attr_fetch(xfs_inode_t *ip, char *name, int namelen, ...@@ -177,7 +177,7 @@ xfs_attr_fetch(xfs_inode_t *ip, char *name, int namelen,
} }
int int
xfs_attr_get(bhv_desc_t *bdp, char *name, char *value, int *valuelenp, xfs_attr_get(bhv_desc_t *bdp, const char *name, char *value, int *valuelenp,
int flags, struct cred *cred) int flags, struct cred *cred)
{ {
xfs_inode_t *ip = XFS_BHVTOI(bdp); 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,7 +201,7 @@ xfs_attr_get(bhv_desc_t *bdp, char *name, char *value, int *valuelenp,
} }
STATIC int STATIC int
xfs_attr_set_int(xfs_inode_t *dp, char *name, int namelen, xfs_attr_set_int(xfs_inode_t *dp, const char *name, int namelen,
char *value, int valuelen, int flags) char *value, int valuelen, int flags)
{ {
xfs_da_args_t args; xfs_da_args_t args;
...@@ -437,7 +437,7 @@ xfs_attr_set_int(xfs_inode_t *dp, char *name, int namelen, ...@@ -437,7 +437,7 @@ xfs_attr_set_int(xfs_inode_t *dp, char *name, int namelen,
} }
int int
xfs_attr_set(bhv_desc_t *bdp, char *name, char *value, int valuelen, int flags, xfs_attr_set(bhv_desc_t *bdp, const char *name, char *value, int valuelen, int flags,
struct cred *cred) struct cred *cred)
{ {
xfs_inode_t *dp; xfs_inode_t *dp;
...@@ -469,7 +469,7 @@ xfs_attr_set(bhv_desc_t *bdp, char *name, char *value, int valuelen, int flags, ...@@ -469,7 +469,7 @@ xfs_attr_set(bhv_desc_t *bdp, char *name, char *value, int valuelen, int flags,
* Transitions attribute list from Btree to shortform as necessary. * Transitions attribute list from Btree to shortform as necessary.
*/ */
STATIC int STATIC int
xfs_attr_remove_int(xfs_inode_t *dp, char *name, int namelen, int flags) xfs_attr_remove_int(xfs_inode_t *dp, const char *name, int namelen, int flags)
{ {
xfs_da_args_t args; xfs_da_args_t args;
xfs_fsblock_t firstblock; xfs_fsblock_t firstblock;
...@@ -592,7 +592,7 @@ xfs_attr_remove_int(xfs_inode_t *dp, char *name, int namelen, int flags) ...@@ -592,7 +592,7 @@ xfs_attr_remove_int(xfs_inode_t *dp, char *name, int namelen, int flags)
} }
int int
xfs_attr_remove(bhv_desc_t *bdp, char *name, int flags, struct cred *cred) xfs_attr_remove(bhv_desc_t *bdp, const char *name, int flags, struct cred *cred)
{ {
xfs_inode_t *dp; xfs_inode_t *dp;
int namelen, error; int namelen, error;
......
...@@ -172,15 +172,15 @@ struct xfs_da_args; ...@@ -172,15 +172,15 @@ struct xfs_da_args;
/* /*
* Overall external interface routines. * Overall external interface routines.
*/ */
int xfs_attr_get(bhv_desc_t *, char *, char *, int *, int, struct cred *); int xfs_attr_get(bhv_desc_t *, const char *, char *, int *, int, struct cred *);
int xfs_attr_set(bhv_desc_t *, char *, char *, int, int, struct cred *); int xfs_attr_set(bhv_desc_t *, const char *, char *, int, int, struct cred *);
int xfs_attr_remove(bhv_desc_t *, char *, int, struct cred *); int xfs_attr_remove(bhv_desc_t *, const char *, int, struct cred *);
int xfs_attr_list(bhv_desc_t *, char *, int, int, int xfs_attr_list(bhv_desc_t *, char *, int, int,
struct attrlist_cursor_kern *, struct cred *); struct attrlist_cursor_kern *, struct cred *);
int xfs_attr_inactive(struct xfs_inode *dp); int xfs_attr_inactive(struct xfs_inode *dp);
int xfs_attr_shortform_getvalue(struct xfs_da_args *); int xfs_attr_shortform_getvalue(struct xfs_da_args *);
int xfs_attr_fetch(struct xfs_inode *, char *, int, int xfs_attr_fetch(struct xfs_inode *, const char *, int,
char *, int *, int, struct cred *); char *, int *, int, struct cred *);
#endif /* __XFS_ATTR_H__ */ #endif /* __XFS_ATTR_H__ */
...@@ -1604,7 +1604,7 @@ xfs_da_path_shift(xfs_da_state_t *state, xfs_da_state_path_t *path, ...@@ -1604,7 +1604,7 @@ xfs_da_path_shift(xfs_da_state_t *state, xfs_da_state_path_t *path,
* This is implemented with some source-level loop unrolling. * This is implemented with some source-level loop unrolling.
*/ */
xfs_dahash_t xfs_dahash_t
xfs_da_hashname(uchar_t *name, int namelen) xfs_da_hashname(const uchar_t *name, int namelen)
{ {
xfs_dahash_t hash; xfs_dahash_t hash;
......
...@@ -168,7 +168,7 @@ int xfs_da_cookie_entry(struct xfs_mount *mp, xfs_off_t cookie); ...@@ -168,7 +168,7 @@ int xfs_da_cookie_entry(struct xfs_mount *mp, xfs_off_t cookie);
* Structure to ease passing around component names. * Structure to ease passing around component names.
*/ */
typedef struct xfs_da_args { typedef struct xfs_da_args {
uchar_t *name; /* string (maybe not NULL terminated) */ const uchar_t *name; /* string (maybe not NULL terminated) */
int namelen; /* length of string (maybe no NULL) */ int namelen; /* length of string (maybe no NULL) */
uchar_t *value; /* set of bytes (maybe contain NULLs) */ uchar_t *value; /* set of bytes (maybe contain NULLs) */
int valuelen; /* length of value */ 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,7 +314,7 @@ xfs_daddr_t xfs_da_reada_buf(struct xfs_trans *trans, struct xfs_inode *dp,
int xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno, int xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno,
xfs_dabuf_t *dead_buf); xfs_dabuf_t *dead_buf);
uint xfs_da_hashname(uchar_t *name_string, int name_length); uint xfs_da_hashname(const uchar_t *name_string, int name_length);
uint xfs_da_log2_roundup(uint i); uint xfs_da_log2_roundup(uint i);
xfs_da_state_t *xfs_da_state_alloc(void); xfs_da_state_t *xfs_da_state_alloc(void);
void xfs_da_state_free(xfs_da_state_t *state); void xfs_da_state_free(xfs_da_state_t *state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment