From 6d6a3172034640d0730d90aab08cf8c816331315 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Wed, 7 May 2008 08:53:25 -0300 Subject: [PATCH] The lseek system call. --- _ldd.xml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/_ldd.xml b/_ldd.xml index 47ebedf..f5a8bff 100644 --- a/_ldd.xml +++ b/_ldd.xml @@ -56,7 +56,7 @@ write close -seek +lseek ioctl @@ -144,4 +144,27 @@ c = write (fd, buffer, strlen (buffer)); + +lseek + +The lseek system call changes the current position of the file, allowing +to read or write in that position. Seeking on a device may have many +different meanings. + + +off\_t lseek (int fd, off\_t pos, int whence); + + +The meaning of the position depends on the value of whence, which can be +SEEK\_SET (the absolute position), SEEK\_CUR (relative to the current +position), SEEK\_END (relative to the end of the file). + + +Example: + + +lseek (fd, 0, SEEK\_END); + + + -- 2.20.1