delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/08/17/10:45:45

Message-ID: <399BF9CB.587F65E2@softhome.net>
Date: Thu, 17 Aug 2000 16:42:19 +0200
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: lt,en
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: djgpp-workers AT delorie DOT com
Subject: Re: Patch: __internal_readlink()
References: <399BE30E DOT AA1F3E6C AT softhome DOT net> <6480-Thu17Aug2000172504+0300-eliz AT is DOT elta DOT co DOT il>
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii wrote:
> In the latter case, __FSEXT_call_open_handlers will not do,
> because it searches the wrong list of handlers.

Correct me if I'm wrong: if user adds FSEXT for a particular
handle, then this function won't call its handler, it will call
readlink handler as an 'open' handler, right?

> I think you need to test for handle-or-path up front, and if you get a
> handle, use code such as _close does:
> 
>   __FSEXT_Function *func = __FSEXT_get_function(handle);
>   if (func)
>   {
>     ...

So I have to call single handler in two ways: this - 

if (func(__FSEXT_readlink, &rv, &blah, &blah,...))
    return rv;

and this:

if (__FSEXT_call_open_handlers(__FSEXT_readlink, &ret, &__path))

Will the same handler do well in both cases?

> Of course, if you already tested the code you've posted, and it works,
> then disregard my comments ;-).

Tested. Works. readlink() part. fstat() part _will_ work, at first I have
to change fstat() to use it, then - debugging, testing, debugging... 
When it comes to FSEXT, I feel less confident.

Laurynas

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019