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:
@@ -750,7 +750,7 @@ _kern_readv(int fd, off_t pos, const iovec *vecs, size_t count)
|
|||||||
status_t status;
|
status_t status;
|
||||||
uint32 i;
|
uint32 i;
|
||||||
|
|
||||||
descriptor = get_fd(get_current_io_context(false), fd);
|
descriptor = get_fd(get_current_io_context(true), fd);
|
||||||
if (!descriptor)
|
if (!descriptor)
|
||||||
return B_FILE_ERROR;
|
return B_FILE_ERROR;
|
||||||
if ((descriptor->open_mode & O_RWMASK) == O_WRONLY) {
|
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;
|
status_t status;
|
||||||
uint32 i;
|
uint32 i;
|
||||||
|
|
||||||
descriptor = get_fd(get_current_io_context(false), fd);
|
descriptor = get_fd(get_current_io_context(true), fd);
|
||||||
if (!descriptor)
|
if (!descriptor)
|
||||||
return B_FILE_ERROR;
|
return B_FILE_ERROR;
|
||||||
if ((descriptor->open_mode & O_RWMASK) == O_RDONLY) {
|
if ((descriptor->open_mode & O_RWMASK) == O_RDONLY) {
|
||||||
|
|||||||
Reference in New Issue
Block a user