The lseek system call.
authorThadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
Wed, 7 May 2008 11:53:25 +0000 (08:53 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
Wed, 7 May 2008 11:53:25 +0000 (08:53 -0300)
_ldd.xml

index 47ebedf..f5a8bff 100644 (file)
--- a/_ldd.xml
+++ b/_ldd.xml
@@ -56,7 +56,7 @@ write
 close
 </para></listitem>
 <listitem><para>
 close
 </para></listitem>
 <listitem><para>
-seek
+lseek
 </para></listitem>
 <listitem><para>
 ioctl
 </para></listitem>
 <listitem><para>
 ioctl
@@ -144,4 +144,27 @@ c = write (fd, buffer, strlen (buffer));
 </para>
 </foil>
 
 </para>
 </foil>
 
+<foil>
+<title>lseek</title>
+<para>
+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.
+</para>
+<para>
+off\_t lseek (int fd, off\_t pos, int whence);
+</para>
+<para>
+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).
+</para>
+<para>
+Example:
+</para>
+<para>
+lseek (fd, 0, SEEK\_END);
+</para>
+</foil>
+
 </slides>
 </slides>