aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-09-19 14:25:55 +0000
committervodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-09-19 14:25:55 +0000
commitdf1194ec0f7bdb696bc2cd8ec2996a402713f994 (patch)
treec0651e69d5852ae36a86fe8a5c7ec00e8552faec
parentbabd4aec9fd254a615cb9bab9ab9a207846d35b6 (diff)
downloadbusybox-w32-df1194ec0f7bdb696bc2cd8ec2996a402713f994.tar.gz
busybox-w32-df1194ec0f7bdb696bc2cd8ec2996a402713f994.tar.bz2
busybox-w32-df1194ec0f7bdb696bc2cd8ec2996a402713f994.zip
hmm, forgoten remove llseek?
git-svn-id: svn://busybox.net/trunk/busybox@11504 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--e2fsprogs/blkid/llseek.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/e2fsprogs/blkid/llseek.c b/e2fsprogs/blkid/llseek.c
deleted file mode 100644
index 82388dd63..000000000
--- a/e2fsprogs/blkid/llseek.c
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * llseek.c -- stub calling the llseek system call
3 *
4 * Copyright (C) 1994, 1995, 1996, 1997 Theodore Ts'o.
5 *
6 * %Begin-Header%
7 * This file may be redistributed under the terms of the
8 * GNU Lesser General Public License.
9 * %End-Header%
10 */
11
12#if HAVE_SYS_TYPES_H
13#include <sys/types.h>
14#endif
15
16#if HAVE_ERRNO_H
17#include <errno.h>
18#endif
19#if HAVE_UNISTD_H
20#include <unistd.h>
21#endif
22
23#include "blkidP.h"
24
25#ifdef CONFIG_LFS
26# define my_llseek lseek64
27#else
28# define my_llseek lseek
29#endif
30
31blkid_loff_t blkid_llseek(int fd, blkid_loff_t offset, int whence)
32{
33 blkid_loff_t result;
34 static int do_compat = 0;
35
36 if ((sizeof(off_t) >= sizeof(blkid_loff_t)) ||
37 (offset < ((blkid_loff_t) 1 << ((sizeof(off_t)*8) -1))))
38 return lseek(fd, (off_t) offset, whence);
39
40 if (do_compat) {
41 errno = EOVERFLOW;
42 return -1;
43 }
44
45 result = my_llseek(fd, offset, whence);
46 if (result == -1 && errno == ENOSYS) {
47 /*
48 * Just in case this code runs on top of an old kernel
49 * which does not support the llseek system call
50 */
51 do_compat++;
52 errno = EOVERFLOW;
53 }
54 return result;
55}