Commit Graph

11 Commits

Author SHA1 Message Date
Norman Feske 2b5f4b0aaf file system: Exception for non-permitted symlinks
Until now, there was not exception type for the condition where a
symlink was created on a file system w/o supporting symlinks, e.g., FAT.
The corresponding file-system server (ffat_fs) used to return a negative
handle as a work around. I added 'Permission_denied' to the list of
exceptions thrown by 'File_system::Session::symlink' to handle this case
in a clean way.
2014-04-24 14:56:36 +02:00
Josef Söntgen e1370b558e add sync implementation to various fs servers
Fixes #1007.
2013-12-20 15:20:10 +01:00
Norman Feske 6575856624 os: Split Session_label from Session_policy
By splitting Session_policy into two classes, we make it more flexible.
Originally, the constructor accepted solely an args string, which made it
unusable for situations where we already have extracted the session
label (e.g., stored in the session meta data of a server). Now, the
extraction of the label from the args string is performed by the new
Session_label class instead, which, in turn, can be passed to the
constructor of Session_policy.

This change causes a minor API change. The following code

  Session_policy policy(session_args);

Must be turned into

  Session_label  label(session_args);
  Session_policy policy(label);
2013-09-23 14:25:59 +02:00
Norman Feske fca8994584 Introduce notifications to file-system interface
This patch extends the file-system interface with the ability to monitor
changes of files or directories. The new 'File_system::sigh' function
can be used to install a signal handler for an open node.

The 'ram_fs' server has been enhanced to support the new interface. So
any file or directory changes can now be observed by 'ram_fs' clients.

Fixes #607
2013-01-15 10:18:07 +01:00
Norman Feske 73ab30c22c Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
Norman Feske 13d4108fea Unify 'Signal_dispatcher' interfaces
Several users of the signal API used custom convenience classes to
invoke signal-handling functions on the reception of incoming signals.
The 'Signal_dispatcher' pattern turned out to be particularly useful. To
avoid the duplication of this code across the code base, this patch
adds the interface to 'base/signal.h'.

Furthermore, the patch changes the 'Signal::num()' return type from int
to unsigned because negative numbers are meaningless here.

Fixes #511
2013-01-10 21:09:14 +01:00
Christian Prochaska 97308f963a ffat_fs: work with absolute paths
The recently added 'Genode::Path' class makes it easy to create absolute
paths. With this patch the 'ffat_fs' server uses the 'Genode::Path' class
where possible instead of working with 'f_chdir()' and relative paths.
This also solves the problem reported in issue #355, which was caused by
storing a relative file name in the 'File' node.

Fixes #355.
2012-09-14 12:23:26 +02:00
Christian Prochaska dcfcbce856 libc: add support for 'ftruncate()'
Fixes #307.
2012-08-09 11:09:43 +02:00
Christian Prochaska 280fc59edf Fix 'O_CREAT' flag handling in 'open()'
Fixes #313.
2012-08-09 11:09:43 +02:00
Christian Prochaska c708a28eff ffat_fs: don't throw exception in 'close()'
The 'close()' function is not supposed to throw any exceptions.

Fixes #304.
2012-08-01 12:47:50 +02:00
Christian Prochaska 30dc1d83da FAT file system service
This patch implements a service which provides access to files and
directories of a FAT file system via the 'File_system' interface.

Fixes #251.
2012-07-10 16:30:26 +02:00