Hi,

At 15:00 26/10/2000, Stephen C. Tweedie wrote:
>On Thu, Oct 26, 2000 at 11:49:04AM +0100, Anton Altaparmakov wrote:
> > On Thu, 26 Oct 2000, Timothy Shimmin wrote:
> > > How do you remove an attribute or multiple attributes ?
> > > Do you do a SET with a null value in <new> ?
> >
> > You read in all EAs (ATR_GETALL), delete the ones you want to get
> > rid of and then you replace all of them (ATR_REPLACE). Easy. And it works
> > for just one, for seeral or even for all EAs at once.
>
>Actually, no, there is a genuine need for an ATR_DELETE too: I had
>overlooked that.

Ok. It does make sense to have it. - But it would work without it. - I only 
know the existing implementation of EAs found in WinNT which provides only 
two functions for EA handling: ZwQueryEaFile and ZwSetEaFile. (Well, 
ZwCreateFile can be used to set the EAs, too.)

The query function allows getting a single or multiple attributes (or all) 
into a caller allocated buffer and apart from straight ATR_GET and 
ATR_GETALL equivalents, also supports:
- get_EA(s) from caller specified starting index - no ATR_xxx equivalent AFAICS
- sequential reading of EAs + restart EA scan ability - no ATR_xxx 
equivalent AFAICS

The set function is very dumb in that it only accepts a buffer of 
attributes to set (I assume it replaces the old EAs with the ones passed in 
buffer contents thus effectively behaving like ATR_REPLACE but I have never 
bothered to verify this personally. This is the only thing that makes sense 
considering there are no ATR_DELETE, ATR_PREPEND, ATR_APPEND or ATR_SET 
equivalents AFAIK).

Thus, EA querying is more powerful in NT than proposed API but EA setting 
is less powerful in NT than proposed API.

Anyway, you can see why I wasn't missing the ATR_DELETE... I am obviously 
not implying we should copy the WinNT implementation (just making sure 
nobody gets the wrong impression). (-:

Just my 2p.

Regards,

         Anton

-- 
      "Education is what remains after one has forgotten everything he 
learned in school." - Albert Einstein
-- 
Anton Altaparmakov  Voice: +44-(0)1223-333541(lab)
Christ's College    eMail: [EMAIL PROTECTED] / [EMAIL PROTECTED]
Cambridge CB2 3BU    ICQ: 8561279
United Kingdom       WWW: http://www-stu.christs.cam.ac.uk/~aia21/

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]

Reply via email to