summaryrefslogtreecommitdiff
path: root/mysys/my_seek.c
diff options
context:
space:
mode:
authorunknown <thek@kpdesk.mysql.com>2006-11-02 08:47:21 +0100
committerunknown <thek@kpdesk.mysql.com>2006-11-02 08:47:21 +0100
commitdfc8d06c186692db815371f05fc53a2bba1eb48f (patch)
tree0dd1b4b2ac91bb32d567b5e70724f511710ac3c7 /mysys/my_seek.c
parent5b063712f0cf7d6a11438705b08a0a7c53c8f694 (diff)
parent35f18203585d569a6df941536159b0806a19f8ff (diff)
downloadmariadb-git-dfc8d06c186692db815371f05fc53a2bba1eb48f.tar.gz
Merge kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
into kpdesk.mysql.com:/home/thek/dev/mysql-5.1-maint client/mysqltest.c: Auto merged mysql-test/lib/mtr_io.pl: Auto merged mysql-test/lib/mtr_process.pl: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysys/mf_iocache.c: Auto merged mysys/my_lock.c: Auto merged mysys/my_seek.c: Auto merged sql/sql_delete.cc: Auto merged sql/sql_show.cc: Auto merged
Diffstat (limited to 'mysys/my_seek.c')
-rw-r--r--mysys/my_seek.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/mysys/my_seek.c b/mysys/my_seek.c
index 239136c4e7c..269d1a65b31 100644
--- a/mysys/my_seek.c
+++ b/mysys/my_seek.c
@@ -16,8 +16,30 @@
#include "mysys_priv.h"
- /* Seek to position in file */
- /*ARGSUSED*/
+/*
+ Seek to a position in a file.
+
+ ARGUMENTS
+ File fd The file descriptor
+ my_off_t pos The expected position (absolute or relative)
+ int whence A direction parameter and one of
+ {SEEK_SET, SEEK_CUR, SEEK_END}
+ myf MyFlags Not used.
+
+ DESCRIPTION
+ The my_seek function is a wrapper around the system call lseek and
+ repositions the offset of the file descriptor fd to the argument
+ offset according to the directive whence as follows:
+ SEEK_SET The offset is set to offset bytes.
+ SEEK_CUR The offset is set to its current location plus offset bytes
+ SEEK_END The offset is set to the size of the file plus offset bytes
+
+ RETURN VALUE
+ my_off_t newpos The new position in the file.
+ MY_FILEPOS_ERROR An error was encountered while performing
+ the seek. my_errno is set to indicate the
+ actual error.
+*/
my_off_t my_seek(File fd, my_off_t pos, int whence,
myf MyFlags __attribute__((unused)))