From 43eab982cfc4d9cf5b01e318695819e1ec925259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 5 Jul 2008 22:26:21 +0000 Subject: [PATCH] reads now returns B_IS_A_DIRECTORY instead of B_BAD_VALUE for directories git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26267 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/file_systems/reiserfs/kernel_interface.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/reiserfs/kernel_interface.cpp b/src/add-ons/kernel/file_systems/reiserfs/kernel_interface.cpp index 279ff5bbee..f25057774b 100644 --- a/src/add-ons/kernel/file_systems/reiserfs/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/reiserfs/kernel_interface.cpp @@ -436,8 +436,13 @@ reiserfs_read(fs_volume *fs, fs_vnode *_node, void *cookie, off_t pos, *bufferSize)); status_t error = B_OK; // don't read anything but files - if (!node->IsFile()) - error = B_BAD_VALUE; + if (!node->IsFile()) { + if (node->IsDir()) + error = B_IS_A_DIRECTORY; + else + error = B_BAD_VALUE; + } + // read StreamReader *reader = (StreamReader*)cookie; if (error == B_OK) {