public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: nscott@aconex.com
To: xfs@oss.sgi.com
Subject: Re: Portability of libattr
Date: Sat, 12 Apr 2008 05:47:54 +1000 (EST)	[thread overview]
Message-ID: <59537.192.168.3.1.1207943274.squirrel@mail.aconex.com> (raw)
In-Reply-To: <20080411164044.GA6928@ou.uhercice.ipv6ia.org>

> On Fri, Apr 11, 2008 at 10:01:27AM -0500, Russell Cattelan wrote:
>> I have not looked closely at the FreeBSD EA stuff so I don't know how
>> different things are. I can't imagine they are that far off?
>>
> Unfortunatelly, I have no FreeBSD machine available now, but as I found in
> its
> manual pages, they have splitted the names space and the rest of the EA
> name.
> The namespaces are enumerated. So you can't just call

This part (at least) is the same as the IRIX API (on IRIX the namespaces
are also enumerated).

> getxattr("user.mime_type', ...). Also they support reading EA from any
> arbitrarry offset like Darwin. (Linux reads from first byte always).
> FreeBSD
> API is little more rich.

Hmm, supporting that is a bit of an issue (do you need to?) - neither
IRIX nor Linux allow offsets for attrs.

>> I thought the libattr code does compile on IRIX. There was an effort at

libattr is providing a mapping between Linux (and potential other APIs)
and the IRIX libc API - so, there is no need for it to compile on IRIX.

> Great. Could you tell me which of these two APIs are the standard
> interface?

libattr exports the IRIX interface.  There are no standards here.

> I'm a little confused about all the Linux code in libattr (like syscall
> numbers) because glibc-2.6.1 has already syscall wrappers. So If added

libattr predates the libc interfaces.

> support
> for Darwin of FreeBSD into libattr, which level should I implement?
> attr_get(3) or getxattr(2/3) which is still parto of libattr? In other
> words:
> Should I implement IRIX-styled API or the Linux-styled one?

I'd suggest IRIX style, since I expect that will be closer to other
platforms,
and was the original intent with libattr.  I imagine the biggest problem will
be the list operation, that is by far the most complex (and wierd, on IRIX).

cheers.

--
Nathan

      reply	other threads:[~2008-04-11 20:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-09 18:41 Portability of libattr petr.pisar
2008-04-09 18:54 ` Christoph Hellwig
2008-04-11 15:01   ` Russell Cattelan
2008-04-11 16:40     ` petr.pisar
2008-04-11 19:47       ` nscott [this message]

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=59537.192.168.3.1.1207943274.squirrel@mail.aconex.com \
    --to=nscott@aconex.com \
    --cc=xfs@oss.sgi.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