|
|
|
|
|||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to stack libtrivfs-based translators
Hello,
I have written a libtrivfs-based translator (the source code is supplied in the attachment), however I have problems with stacking it upon itself. I compile it using the following command: gcc -Wall -g -ltrivfs -lfshelp mangle.c -o mangle -DDEBUG -DMANGLE Then I stack it upon an untranslated node foo, which is a text file containing the text: 'Hello'. I use the following command: settrans -a foo mangle If I now try to stack mangle upon foo again, using the command: settrans -L foo mangle I receive the following error message: settrans: foo: not supported I also tried settrans -aL foo mangle (not sure if this matters), but I obtain the same result. When I try fsysopts on the translated node foo in the following way: fsysopts foo I get a similar error: fsysopts: foo: not supported As you can see from mangle.c, I print a message in a log file whenever any of libtrivfs callbacks is called. After the two invocations of settrans, this file still contains the greeting message only (i.e. "Log session started"). Could you please tell me what I am doing wrong? scolobb |
|
#2
|
|||
|
|||
|
How to stack libtrivfs-based translators
Hi,
Tue, Jul 15, 2008 at 06:10:02PM +0300, Sergiu Ivanov wrote: I have written a libtrivfs-based translator (the source code is supplied in the attachment), however I have problems with stacking it upon itself. [] If I now try to stack mangle upon foo again, using the command: settrans -L foo mangle I receive the following error message: settrans: foo: not supported This requires certain RPCs in fs.defs (and probably fsys.defs) to be implemented, most notably file_set_translator. A quick look at file-set-translator.c from libtrivfs shows us that trivfs_S_file_set_translator() is "implemented" as { return EPNTSUPP; } i.e. it's not implemented at all. In other words, libtrivfs doesn't seem to support setting further translators on the translated node out of the box. (I think you could implement it manually, though) I must admit that this surprises me quite a bit. I wonder whether there is any good reason for that When I try fsysopts on the translated node foo in the following way: fsysopts foo I get a similar error: fsysopts: foo: not supported You need to implement the trivfs_append_args() callback -- see the hello translator for a trivial example, or others like pfinet for more complex ones. -antrik- |
|
#3
|
|||
|
|||
|
How to stack libtrivfs-based translators
Hi,
Wed, Jul 23, 2008 at 12:00:59PM +0300, Sergiu Ivanov wrote: Could anybody suggest and idea how to implement this trivfs_S_file_set_translator callback? I tried to find some clues in trivfs.h and in hurd-cvs, but my attempts ended fruitless Have you checked what libnetfs does? Probably you need to do more or less the same -antrik- |
![]() |
| Viewing: Web Development Archives > Mailing Lists > Unix > How to stack libtrivfs-based translators |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|