* Reverted r26293 again, as that "subtle" change also prevented any device I/O
from happening... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26294 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
bed8516acc
commit
92c3ae2b69
@ -4722,12 +4722,8 @@ file_read(struct file_descriptor *descriptor, off_t pos, void *buffer,
|
||||
struct vnode *vnode = descriptor->u.vnode;
|
||||
FUNCTION(("file_read: buf %p, pos %Ld, len %p = %ld\n", buffer, pos, length, *length));
|
||||
|
||||
if (!S_ISREG(vnode->type)) {
|
||||
if (S_ISDIR(vnode->type))
|
||||
return B_IS_A_DIRECTORY;
|
||||
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
if (S_ISDIR(vnode->type))
|
||||
return B_IS_A_DIRECTORY;
|
||||
|
||||
return FS_CALL(vnode, read, descriptor->cookie, pos, buffer, length);
|
||||
}
|
||||
@ -4740,12 +4736,8 @@ file_write(struct file_descriptor *descriptor, off_t pos, const void *buffer,
|
||||
struct vnode *vnode = descriptor->u.vnode;
|
||||
FUNCTION(("file_write: buf %p, pos %Ld, len %p\n", buffer, pos, length));
|
||||
|
||||
if (!S_ISREG(vnode->type)) {
|
||||
if (S_ISDIR(vnode->type))
|
||||
return B_IS_A_DIRECTORY;
|
||||
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
if (S_ISDIR(vnode->type))
|
||||
return B_IS_A_DIRECTORY;
|
||||
|
||||
return FS_CALL(vnode, write, descriptor->cookie, pos, buffer, length);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user