Hi,
Recently I'm using libtiff library on L4/Fiasco. I can use some function from that library. But when I'm trying to create an image by using libtiff function, I got this error message:
TIFFOpen: output.tif: Cannot open. Could not open output.tif for writing MOE: task 1561539 exited with 42
Here is my configuration in module.list entry tiff_test2 roottask moe --init=rom/tiff_test2 module l4re module tiff_test2
I compile and run it over linux and it works properly. This application is supposed to create the output file and then open it by TIFFOpen function. So, I think there is a trick to launch this tiff application over L4/fiasco, so the kernel can permit the application to create a file. But, it's only my assumption and I'm not really sure about this. If by any chance you know something about it, please let me know. Thanks
regards,
Irvanda
Hi,
On Thu Feb 27, 2014 at 14:59:19 +0900, Irvanda Kurniadi wrote:
Recently I'm using libtiff library on L4/Fiasco. I can use some function from that library. But when I'm trying to create an image by using libtiff function, I got this error message:
TIFFOpen: output.tif: Cannot open. Could not open output.tif for writing MOE: task 1561539 exited with 42
Here is my configuration in module.list entry tiff_test2 roottask moe --init=rom/tiff_test2 module l4re module tiff_test2
I compile and run it over linux and it works properly. This application is supposed to create the output file and then open it by TIFFOpen function. So, I think there is a trick to launch this tiff application over L4/fiasco, so the kernel can permit the application to create a file. But, it's only my assumption and I'm not really sure about this. If by any chance you know something about it, please let me know. Thanks
Per default, there's no writable directory available. You can use tmpfs. Add the following in your application's Makefile: REQUIRES_LIBS += libmount libl4revfs-fs-tmpfs
Then add a fstab file, with this content (usual syntax): / /tmp tmpfs defaults
The last thing to do is to tell your application where to find the fstab file. You need a config file for that, with this content:
L4.default_loader:start({}, "rom/tiff_test2", { FSTAB_FILE = "rom/fstab" });
Do not forget to change your module.list entry, add ned and put "roottask moe rom/config.cfg" there instead of the --init version.
Now you should be able to write in /tmp in your application.
Adam
On Sat, Mar 1, 2014 at 8:34 AM, Adam Lackorzynski <adam@os.inf.tu-dresden.de
wrote:
I think there is a trick to launch this tiff application over
L4/fiasco, so the kernel can permit the application to create a file.
Per default, there's no writable directory available. You can use tmpfs. Add the following in your application's Makefile: REQUIRES_LIBS += libmount libl4revfs-fs-tmpfs
Then add a fstab file, with this content (usual syntax):
/ /tmp tmpfs defaults
The last thing to do is to tell your application where to find the fstab file. You need a config file for that, with this content:
L4.default_loader:start({}, "rom/tiff_test2", { FSTAB_FILE = "rom/fstab" });
Do not forget to change your module.list entry, add ned and put "roottask moe rom/config.cfg" there instead of the --init version.
Now you should be able to write in /tmp in your application.
I did the instruction above. It seems like the application could write in /tmp directory. But I'm curious which /tmp directory that the application use to create the file? Since I couldn't find the created file anywhere. Is it by any chance located in /tmp of the running application? If it's the case, Is there any other way to access the created file that has been created by my application?
regards,
Irvanda
On Mon Mar 03, 2014 at 19:32:54 +0900, Irvanda Kurniadi wrote:
I did the instruction above. It seems like the application could write in /tmp directory. But I'm curious which /tmp directory that the application use to create the file? Since I couldn't find the created file anywhere. Is it by any chance located in /tmp of the running application? If it's the case, Is there any other way to access the created file that has been created by my application?
The tmpfs filesystem is application local, so you'll indeed only see the written file within the same application. Currently there's no way to access that tmpfs from outside the application.
Adam
l4-hackers@os.inf.tu-dresden.de