mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-30 06:04:25 +00:00
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:
parent
b43a5f1255
commit
2b5f4b0aaf
@ -290,7 +290,7 @@ namespace File_system {
|
|||||||
Symlink_handle symlink(Dir_handle, Name const &name, bool create)
|
Symlink_handle symlink(Dir_handle, Name const &name, bool create)
|
||||||
{
|
{
|
||||||
/* not supported */
|
/* not supported */
|
||||||
return Symlink_handle(-1);
|
throw Permission_denied();
|
||||||
}
|
}
|
||||||
|
|
||||||
Dir_handle dir(Path const &path, bool create)
|
Dir_handle dir(Path const &path, bool create)
|
||||||
|
@ -302,7 +302,7 @@ namespace File_system {
|
|||||||
Dir_handle, Name const &, Mode, bool);
|
Dir_handle, Name const &, Mode, bool);
|
||||||
GENODE_RPC_THROW(Rpc_symlink, Symlink_handle, symlink,
|
GENODE_RPC_THROW(Rpc_symlink, Symlink_handle, symlink,
|
||||||
GENODE_TYPE_LIST(Invalid_handle, Node_already_exists,
|
GENODE_TYPE_LIST(Invalid_handle, Node_already_exists,
|
||||||
Invalid_name, Lookup_failed),
|
Invalid_name, Lookup_failed, Permission_denied),
|
||||||
Dir_handle, Name const &, bool);
|
Dir_handle, Name const &, bool);
|
||||||
GENODE_RPC_THROW(Rpc_dir, Dir_handle, dir,
|
GENODE_RPC_THROW(Rpc_dir, Dir_handle, dir,
|
||||||
GENODE_TYPE_LIST(Permission_denied, Node_already_exists,
|
GENODE_TYPE_LIST(Permission_denied, Node_already_exists,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user