Fixed two stupid bugs in _kern_writev() and _kern_readv() - they accidently

tried to write from/read to the userland file descriptor instead of the one
of the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14412 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-10-18 19:11:07 +00:00
parent e50616872e
commit 28953e6c2b
+2 -2
View File
@@ -750,7 +750,7 @@ _kern_readv(int fd, off_t pos, const iovec *vecs, size_t count)
status_t status;
uint32 i;
descriptor = get_fd(get_current_io_context(false), fd);
descriptor = get_fd(get_current_io_context(true), fd);
if (!descriptor)
return B_FILE_ERROR;
if ((descriptor->open_mode & O_RWMASK) == O_WRONLY) {
@@ -828,7 +828,7 @@ _kern_writev(int fd, off_t pos, const iovec *vecs, size_t count)
status_t status;
uint32 i;
descriptor = get_fd(get_current_io_context(false), fd);
descriptor = get_fd(get_current_io_context(true), fd);
if (!descriptor)
return B_FILE_ERROR;
if ((descriptor->open_mode & O_RWMASK) == O_RDONLY) {