[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: I can't find the prototypes for eg trivfs_S_io_read



Hi!

Ulrich Eckhardt <doomster@knuut.de> wrote:
>  I have gotten around to notice that these protos somehow stem from 
> hurd/io.defs, but have not been able to extract them. When applying mig on 
> this file, I do get io_read, but the parameters passed are not the same. In 
> fact, some are the same and you can easily spot that those two are related, 
> but I can't figure out what to do with the rest.

The trivfs_* stuff is specific to libtrivfs, which is intended to
simplify writing single-node translators. It does the low-level stuff
for you. This means that while trivfs_S_io_read is related to the
io_read RPC, it is not an actual implementation for it; even if you
know everything about the io interface, you still won't know how
libtrivfs works. If you want to know something about the arguments of
trivfs_S_io_*, you'll have to look at a different place. The current
texi documentation does not describe these functions either, but of
course it should.

> - I would have looked for those prototypes in the hurd-dev package, to be 
> exact in hurd/trivfs.h. Should I file a bug against this, is it a bug at all ?
> Of course I have found the functions themselves in the hurd soruces, but 
> shouldn't hurd-dev be enough for me ?

My personal opinion is that you are right: trivfs.h should contain
this information, even if it isn't required to compile a trivfs
translator.

> - It seems that my translator 'overrides' the functions from libtrivfs, just 
> like with virtual functions in C++, right ? Is there also a way to call the 
> function provided by libtrivfs from my overridden function (like calling 
> Base::function() in C++)?

I don't know a (good) way to do this. Probably you could link the code
that uses the trivfs implementations against libtrivfs before linking it
with your own implementation or something like that.

> - what does the _S_ in the function-name mean ?

io_read is the name of the RPC.
S_io_read indicates that this is the _S_erver implementation.
trivfs_S_io_read is the trivfs variant of S_io_read.

Cheers,
GNU/Wolfgang

-- 
Wolfgang Jährling <wolfgang@pro-linux.de> `-:._ "Omnis enim res, quae dando
Debian GNU/Linux user && Debian GNU/Hurd user  `-:. non deficit, dum habetur
Hurd Hacking Guide - http://stdio.cjb.net/hhg.html )  et non datur, nondum
www.debian.org || www.gnu.org || hurd.gnu.org _,-:' habetur, quomodo habenda
["Accelerate your PC - with 9.81 m/s^2."] ,-:'   est." --> fsfeurope.org <--



Reply to: