comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: ZFS/BtrFS bindings
Date: Thu, 18 Jul 2013 23:56:00 -0500
Date: 2013-07-18T23:56:00-05:00	[thread overview]
Message-ID: <ksagt2$ojm$1@loke.gir.dk> (raw)
In-Reply-To: 72a51d66-2ebf-4162-8df7-bcde8c6626cf@googlegroups.com

"Dufr" <dufriz@gmail.com> wrote in message 
news:72a51d66-2ebf-4162-8df7-bcde8c6626cf@googlegroups.com...
>
>> I'm presuming that you want to get xattr of files that are open in Ada. 
>> That
>> means that you have to have some cooperation from your vendor, in that 
>> Ada
>> does not make implementation artifacts like file handles available. Some
>> implementations might have a way to get those, some might not.
>>
>> The problem is much easier if you just want to get xattr based on file
>> names, because then one could write a binding to do just that, and avoid 
>> any
>> interaction with the Ada implementation.
>
> Sorry but I couldn't understand the difference between the two cases. 
> Would you mind elaborating a bit on that?

Sure. If you need to get extended attributes of an open Ada file (that is, 
from an object of type File_Type), then you'd have to get some cooperation 
from your vendor, since the underlying file handles aren't usually available 
to bindings and the like. (And even if they are, that will work only with 
that specific compiler and probably target OS.)

OTOH, if you just need extended attributes of a file whose name you know, 
then you could have a binding that worked much like Ada.Directories and just 
takes the name of the file. The binding would then have to open it (or 
whatever is needed to get at the extended attributes), so that's likely to 
be slower -- but it probably wouldn't matter that much unless you had to 
grab xattrs thousands of times on the same file.

                                          Randy.




  reply	other threads:[~2013-07-19  4:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-14  2:48 ZFS/BtrFS bindings Dufr
2013-07-14  9:47 ` Dirk Heinrichs
2013-07-14  9:59   ` Dufr
2013-07-16  0:31     ` Randy Brukardt
2013-07-16  2:55       ` Dufr
2013-07-16  4:25         ` Jeffrey Carter
2013-07-16 22:18           ` Randy Brukardt
2013-07-18 12:47             ` Dufr
2013-07-19  4:56               ` Randy Brukardt [this message]
2013-07-16 20:29     ` Dirk Heinrichs
2013-07-22 19:20       ` Per Sandberg
2013-07-22 19:51       ` Per Sandberg
2013-08-04  6:46         ` Dirk Heinrichs
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox