From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder4.news.weretis.net!news.on-luebeck.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: ZFS/BtrFS bindings Date: Thu, 18 Jul 2013 23:56:00 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <46f7ac55-b920-4003-8cac-a9cbc24b29a2@googlegroups.com> <3b1b00b6-9799-4827-b51c-8e08d4dc6e91@googlegroups.com> <600aa74c-78af-4d43-9301-ab9c0022f825@googlegroups.com> <72a51d66-2ebf-4162-8df7-bcde8c6626cf@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1374209762 25206 69.95.181.76 (19 Jul 2013 04:56:02 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 19 Jul 2013 04:56:02 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: number.nntp.dca.giganews.com comp.lang.ada:182583 Date: 2013-07-18T23:56:00-05:00 List-Id: "Dufr" 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.