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.
This commit is contained in:
Norman Feske 2014-04-18 16:27:58 +02:00
parent b43a5f1255
commit 2b5f4b0aaf
2 changed files with 2 additions and 2 deletions

View File

@ -290,7 +290,7 @@ namespace File_system {
Symlink_handle symlink(Dir_handle, Name const &name, bool create)
{
/* not supported */
return Symlink_handle(-1);
throw Permission_denied();
}
Dir_handle dir(Path const &path, bool create)

View File

@ -302,7 +302,7 @@ namespace File_system {
Dir_handle, Name const &, Mode, bool);
GENODE_RPC_THROW(Rpc_symlink, Symlink_handle, symlink,
GENODE_TYPE_LIST(Invalid_handle, Node_already_exists,
Invalid_name, Lookup_failed),
Invalid_name, Lookup_failed, Permission_denied),
Dir_handle, Name const &, bool);
GENODE_RPC_THROW(Rpc_dir, Dir_handle, dir,
GENODE_TYPE_LIST(Permission_denied, Node_already_exists,