I have been thinking about writing a file manager for Genode. This has led me to some questions: Is there already any file manager currently being written? What is the best way of joining multiple filesystems into a single tree? (Or should I be doing something different?) Which libraries/files/functions should I use? I think Boost Filesystems should be ported to Genode at some point, so I might want to use that. How difficult would that be? Or should not add that as a dependency? What's the best way to scan a directory for files and other directories? How much file type detection (and file preview) is safe? Also, I may want to use threading. Are C++11 threads supported?
Hi Ben,
On 01.07.2015 05:06, Nobody III wrote:
Is there already any file manager currently being written?
I don't think so. For the Turmvilla scenario, I am using Noux + the GNU tools (bash, coreutils) as my file manager.
What is the best way of joining multiple filesystems into a single tree? (Or should I be doing something different?)
This is possible by using the VFS library, which is implicitly used by libc-using programs as well as by Noux. The VFS supports stacked file systems similar to the union fs known from Linux.
What's the best way to scan a directory for files and other directories?
The easiest way might be the use of the POSIX functions as provided by the libc. The use of our VFS mechanism is transparent at the libc API level. In principle, you can also use the VFS library directly, without the libc. This is preferable for components that need to avoid the complexity that comes with a libc. Furthermore, at the Genode session level, you may work directly on the 'File_system::Session' interface.
How much file type detection (and file preview) is safe?
A file-type detector, a previewer, or more generally, any interpreter of untrusted (and potentially harmful) data should be sandboxed. Genode's architecture lends itself to the sandboxed execution of such code. For a discussion of the topic, please refer to Section 4.7.1. of the documentation [1].
[1] http://genode.org/documentation/genode-foundations-15-05.pdf
Also, I may want to use threading. Are C++11 threads supported?
C++11 threads are not supported. For multi-threading, you have the options to use the Genode API (Section 8.10. of the documentation), or to use the pthread library (the natural way for libc-using programs).
Best regards Norman
Okay. How would I configure something to join multiple filesystems? Could you provide an example config? Also, how would I add filesystems at runtime? On Jul 1, 2015 3:21 PM, "Norman Feske" <norman.feske@...1...> wrote:
Hi Ben,
On 01.07.2015 05:06, Nobody III wrote:
Is there already any file manager currently being written?
I don't think so. For the Turmvilla scenario, I am using Noux + the GNU tools (bash, coreutils) as my file manager.
What is the best way of joining multiple filesystems into a single tree? (Or should I be doing something different?)
This is possible by using the VFS library, which is implicitly used by libc-using programs as well as by Noux. The VFS supports stacked file systems similar to the union fs known from Linux.
What's the best way to scan a directory for files and other directories?
The easiest way might be the use of the POSIX functions as provided by the libc. The use of our VFS mechanism is transparent at the libc API level. In principle, you can also use the VFS library directly, without the libc. This is preferable for components that need to avoid the complexity that comes with a libc. Furthermore, at the Genode session level, you may work directly on the 'File_system::Session' interface.
How much file type detection (and file preview) is safe?
A file-type detector, a previewer, or more generally, any interpreter of untrusted (and potentially harmful) data should be sandboxed. Genode's architecture lends itself to the sandboxed execution of such code. For a discussion of the topic, please refer to Section 4.7.1. of the documentation [1].
[1] http://genode.org/documentation/genode-foundations-15-05.pdf
Also, I may want to use threading. Are C++11 threads supported?
C++11 threads are not supported. For multi-threading, you have the options to use the Genode API (Section 8.10. of the documentation), or to use the pthread library (the natural way for libc-using programs).
Best regards Norman
-- Dr.-Ing. Norman Feske Genode Labs
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hello,
On 02.07.2015 00:21, Nobody III wrote:
Okay. How would I configure something to join multiple filesystems? Could you provide an example config?
Please look out for run scripts that use the configuration tags '<vfs>' or '<fstab>'. E.g., executing the following command will give you a rough list of run scripts that likely use the VFS mechanism:
grep "(vfs)|(fstab)" `find repos -maxdepth 3 -name "*.run"`
For an illustrative example, I recommend you to take a look at the run script 'repos/ports/run/noux_bash.run'.
You may also find the following section of the release notes 14.05 worth reading:
http://genode.org/documentation/release-notes/14.05#Per-process_virtual_file...
Also, how would I add filesystems at runtime?
Unlink Unix, which has a system-global VFS, on Genode, each individual component has its own component-specific VFS. It is initialized at the startup time of the respective component according to the component's configuration. After the initialization phase, it is fixed for the lifetime of the component.
Regards Norman
Thanks. Can a component edit its own VFS configuration (e.g. add a filesystem at runtime)?
On Wed, Jul 8, 2015 at 7:10 AM, Norman Feske <norman.feske@...1...> wrote:
Hello,
On 02.07.2015 00:21, Nobody III wrote:
Okay. How would I configure something to join multiple filesystems? Could you provide an example config?
Please look out for run scripts that use the configuration tags '<vfs>' or '<fstab>'. E.g., executing the following command will give you a rough list of run scripts that likely use the VFS mechanism:
grep "(vfs)|(fstab)" `find repos -maxdepth 3 -name "*.run"`
For an illustrative example, I recommend you to take a look at the run script 'repos/ports/run/noux_bash.run'.
You may also find the following section of the release notes 14.05 worth reading:
http://genode.org/documentation/release-notes/14.05#Per-process_virtual_file...
Also, how would I add filesystems at runtime?
Unlink Unix, which has a system-global VFS, on Genode, each individual component has its own component-specific VFS. It is initialized at the startup time of the respective component according to the component's configuration. After the initialization phase, it is fixed for the lifetime of the component.
Regards Norman
-- Dr.-Ing. Norman Feske Genode Labs
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main