POSIX functions return their error codes via errno and so does lseek().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22479 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1ea618c556
commit
ede3fe6c94
@ -4,11 +4,19 @@
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <syscalls.h>
|
||||
|
||||
|
||||
off_t
|
||||
lseek(int fd, off_t pos, int whence)
|
||||
{
|
||||
return _kern_seek(fd, pos, whence);
|
||||
off_t result = _kern_seek(fd, pos, whence);
|
||||
if (result < 0) {
|
||||
errno = result;
|
||||
return -1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user