summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen2003-12-04 07:07:14 +0000
committerEric Andersen2003-12-04 07:07:14 +0000
commit50547c07451d07178eeb64e7d8637952b427bd4c (patch)
tree871484e83a0f434f181733b3174efbcfe89a0168
parent3860b2ebd6ad9c68a087c2addd1f1c592aaeaee9 (diff)
downloadbusybox-50547c07451d07178eeb64e7d8637952b427bd4c.zip
busybox-50547c07451d07178eeb64e7d8637952b427bd4c.tar.gz
Do not use the _syscall5 macro -- use syscall(2) instead
-rw-r--r--util-linux/fdisk.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index ca682f7..bd929d8 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -847,7 +847,7 @@ typedef struct {
#define SUN_SSWAP32(x) (sun_other_endian ? __swap32(x) \
: (uint32_t)(x))
-#if defined(FDISK_SUPPORT_LARGE_DISKS)
+#if defined(CONFIG_LFS) || defined(FDISK_SUPPORT_LARGE_DISKS)
/*
* llseek.c -- stub calling the llseek system call
*
@@ -856,21 +856,13 @@ typedef struct {
*/
-#include <syscall.h>
-
-
#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
#define my_llseek lseek
#else
-static int _llseek (unsigned int, unsigned long,
- unsigned long, fdisk_loff_t *, unsigned int);
-
-static _syscall5(int,_llseek,unsigned int,f_d,unsigned long,offset_high,
- unsigned long, offset_low,fdisk_loff_t *,result,
- unsigned int, origin);
+#include <syscall.h>
static fdisk_loff_t my_llseek (unsigned int f_d, fdisk_loff_t offset,
unsigned int origin)
@@ -878,7 +870,7 @@ static fdisk_loff_t my_llseek (unsigned int f_d, fdisk_loff_t offset,
fdisk_loff_t result;
int retval;
- retval = _llseek (f_d, ((unsigned long long) offset) >> 32,
+ retval = syscall(__NR__llseek, f_d, ((unsigned long long) offset) >> 32,
((unsigned long long) offset) & 0xffffffff,
&result, origin);
return (retval == -1 ? (fdisk_loff_t) retval : result);