repo.or.cz
/
haiku.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
headers/bsd: Add sys/queue.h.
[haiku.git]
/
src
/
system
/
libroot
/
posix
/
unistd
/
lseek.c
blob
ff3ff0f0fef2bc5d2961ad085c928cb0f0203edc
1
/*
2
** Copyright 2001, Manuel J. Petit. All rights reserved.
3
** Distributed under the terms of the NewOS License.
4
*/
5
6
#include <unistd.h>
7
8
#include <errno.h>
9
10
#include <errno_private.h>
11
#include <syscalls.h>
12
13
14
off_t
15
lseek
(
int
fd
,
off_t pos
,
int
whence
)
16
{
17
off_t result
=
_kern_seek
(
fd
,
pos
,
whence
);
18
if
(
result
<
0
) {
19
__set_errno
(
result
);
20
return
-
1
;
21
}
22
return
result
;
23
}