From: James Morris <jmorris@namei.org>
To: Steven Whitehouse <swhiteho@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: GFS2 Filesystem [9/16]
Date: Fri, 24 Feb 2006 16:05:13 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.64.0602241559460.8198@excalibur.intercode> (raw)
In-Reply-To: <1140793283.6400.726.camel@quoit.chygwyn.com>
On Fri, 24 Feb 2006, Steven Whitehouse wrote:
> +/**
> + * gfs2_ea_name2type - get the type of the ea, and truncate type from the name
> + * @namep: ea name, possibly with type appended
> + *
> + * Returns: GFS2_EATYPE_XXX
> + */
> +
> +unsigned int gfs2_ea_name2type(const char *name, char **truncated_name)
> +{
> + unsigned int type;
> +
> + if (strncmp(name, "system.", 7) == 0) {
> + type = GFS2_EATYPE_SYS;
> + if (truncated_name)
> + *truncated_name = strchr(name, '.') + 1;
> + } else if (strncmp(name, "user.", 5) == 0) {
> + type = GFS2_EATYPE_USR;
> + if (truncated_name)
> + *truncated_name = strchr(name, '.') + 1;
> + } else {
> + type = GFS2_EATYPE_UNUSED;
> + if (truncated_name)
> + *truncated_name = NULL;
> + }
> +
> + return type;
> +}
Consider using the generic xattr infrastructure in the kernel (xattr.c),
e.g. generic_getxattr() and friends.
- James
--
James Morris
<jmorris@namei.org>
next prev parent reply other threads:[~2006-02-24 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-24 15:01 Steven Whitehouse
2006-02-24 21:05 ` James Morris [this message]
2006-02-27 8:21 ` Steven Whitehouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0602241559460.8198@excalibur.intercode \
--to=jmorris@namei.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®