xfs
[Top] [All Lists]

Use "const char *name" in extattr functions?

To: linux-xfs@xxxxxxxxxxx
Subject: Use "const char *name" in extattr functions?
From: Craig Rodrigues <rodrigc@xxxxxxxxxxxxxx>
Date: Mon, 15 Aug 2005 21:16:26 -0400
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.9i
Hi,

I've been trying to get the FreeBSD API for extended attributes
working with XFS.  The FreeBSD API uses "const char *" strings
for the attribute name.  For example:

     int
     VOP_GETEXTATTR(struct vnode *vp, int attrnamespace, const char *name,
         struct uio *uio, size_t *size, struct ucred *cred,
         struct thread *td);




GCC gave me some problems when I tried passing "const char *" to 
functions which took "char *" parameters for the attribute name.

In the cases which I am interested in, the name parameter is
not changed, so it could easily be const.  Could the use
of attribute names be changed to const in areas of the
XFS code where the name parameter is not actually modified?

I'm thinking of something like the attached patch.


-- 
Craig Rodrigues        
rodrigc@xxxxxxxxxxxxxx

Attachment: extattr_patch.txt
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>