* Creating a symlink now fails with B_NOT_SUPPORTED instead of

B_READ_ONLY_DEVICE if it has a write hook.
* This fixes bug #4141.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32004 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-07-31 00:40:52 +00:00
parent 33e0d2e413
commit 061d2ed1a2
+7 -4
View File
@@ -5939,16 +5939,19 @@ common_create_symlink(int fd, char* path, const char* toPath, int mode,
struct vnode* vnode;
status_t status;
FUNCTION(("common_create_symlink(fd = %d, path = %s, toPath = %s, mode = %d, kernel = %d)\n", fd, path, toPath, mode, kernel));
FUNCTION(("common_create_symlink(fd = %d, path = %s, toPath = %s, "
"mode = %d, kernel = %d)\n", fd, path, toPath, mode, kernel));
status = fd_and_path_to_dir_vnode(fd, path, &vnode, name, kernel);
if (status < B_OK)
if (status != B_OK)
return status;
if (HAS_FS_CALL(vnode, create_symlink))
status = FS_CALL(vnode, create_symlink, name, toPath, mode);
else
status = EROFS;
else {
status = HAS_FS_CALL(vnode, write)
? B_NOT_SUPPORTED : B_READ_ONLY_DEVICE;
}
put_vnode(vnode);