diff options
author | Karel Zak | 2006-12-07 00:27:13 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:27:13 +0100 |
commit | cf6d7faebb6f6989dbf4bac25081e50eafb640ee (patch) | |
tree | 8353e2919ea0146d61e5cdcb76200d1e8929b1af /partx/partx.c | |
parent | Imported from util-linux-2.13-pre5 tarball. (diff) | |
download | kernel-qcow2-util-linux-cf6d7faebb6f6989dbf4bac25081e50eafb640ee.tar.gz kernel-qcow2-util-linux-cf6d7faebb6f6989dbf4bac25081e50eafb640ee.tar.xz kernel-qcow2-util-linux-cf6d7faebb6f6989dbf4bac25081e50eafb640ee.zip |
Imported from util-linux-2.13-pre6 tarball.
Diffstat (limited to 'partx/partx.c')
-rw-r--r-- | partx/partx.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/partx/partx.c b/partx/partx.c index 6448e8c6e..ab10dc87f 100644 --- a/partx/partx.c +++ b/partx/partx.c @@ -333,34 +333,15 @@ xmalloc (size_t size) { return t; } -/* - * sseek: seek to specified sector - */ -#if !defined (__alpha__) && !defined (__ia64__) && !defined (__s390x__) && !defined(__x86_64__) -#define NEED__llseek -#endif - -#ifdef NEED__llseek -#include <linux/unistd.h> /* _syscall */ -static -_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, - long long *, res, uint, wh); -#endif - static int sseek(int fd, unsigned int secnr) { long long in, out; in = ((long long) secnr << 9); out = 1; -#ifdef NEED__llseek - if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0 - || out != in) -#else if ((out = lseek(fd, in, SEEK_SET)) != in) -#endif { - fprintf(stderr, "llseek error\n"); + fprintf(stderr, "lseek error\n"); return -1; } return 0; |