fs_shell: Use proper readv/writev functions on Haiku hosts.
Fixes #18269.
This commit is contained in:
@@ -79,7 +79,11 @@ fssh_readv_pos(int fd, fssh_off_t pos, const struct fssh_iovec *vec, int count)
|
|||||||
if (FSShell::restricted_file_restrict_io(fd, pos, length) < 0)
|
if (FSShell::restricted_file_restrict_io(fd, pos, length) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
#if defined(__HAIKU__)
|
||||||
|
return readv_pos(fd, pos, systemVecs, count);
|
||||||
|
#else
|
||||||
return _kern_readv(fd, pos, systemVecs, count);
|
return _kern_readv(fd, pos, systemVecs, count);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -114,5 +118,9 @@ fssh_writev_pos(int fd, fssh_off_t pos, const struct fssh_iovec *vec, int count)
|
|||||||
if (FSShell::restricted_file_restrict_io(fd, pos, length) < 0)
|
if (FSShell::restricted_file_restrict_io(fd, pos, length) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
#if defined(__HAIKU__)
|
||||||
|
return writev_pos(fd, pos, systemVecs, count);
|
||||||
|
#else
|
||||||
return _kern_writev(fd, pos, systemVecs, count);
|
return _kern_writev(fd, pos, systemVecs, count);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -390,7 +390,11 @@ fssh_read_pos(int fd, fssh_off_t pos, void *buffer, fssh_size_t count)
|
|||||||
{
|
{
|
||||||
if (FSShell::restricted_file_restrict_io(fd, pos, count) < 0)
|
if (FSShell::restricted_file_restrict_io(fd, pos, count) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
#if defined(__HAIKU__)
|
||||||
|
return read_pos(fd, pos, buffer, count);
|
||||||
|
#else
|
||||||
return _kern_read(fd, pos, buffer, count);
|
return _kern_read(fd, pos, buffer, count);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -417,7 +421,11 @@ fssh_write_pos(int fd, fssh_off_t pos, const void *buffer, fssh_size_t count)
|
|||||||
{
|
{
|
||||||
if (FSShell::restricted_file_restrict_io(fd, pos, count) < 0)
|
if (FSShell::restricted_file_restrict_io(fd, pos, count) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
#if defined(__HAIKU__)
|
||||||
|
return write_pos(fd, pos, buffer, count);
|
||||||
|
#else
|
||||||
return _kern_write(fd, pos, buffer, count);
|
return _kern_write(fd, pos, buffer, count);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user