You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
7 years ago
|
Change 64-bit offset code to Android variant.
|
||
|
|
||
|
Parted uses a workaround in case when off_t is 32-bit. This happens i.a.
|
||
|
on arm android. Use android functions rather than syscall.
|
||
|
|
||
|
--- src-orig/libparted/arch/linux.c 2018-06-21 02:53:48.635160013 +0200
|
||
|
+++ src/libparted/arch/linux.c 2018-06-21 02:59:37.842096052 +0200
|
||
|
@@ -1712,25 +1712,10 @@
|
||
|
|
||
|
#if SIZEOF_OFF_T < 8
|
||
|
|
||
|
-static _syscall5(int,_llseek,
|
||
|
- unsigned int, fd,
|
||
|
- unsigned long, offset_high,
|
||
|
- unsigned long, offset_low,
|
||
|
- loff_t*, result,
|
||
|
- unsigned int, origin)
|
||
|
-
|
||
|
loff_t
|
||
|
llseek (unsigned int fd, loff_t offset, unsigned int whence)
|
||
|
{
|
||
|
- loff_t result;
|
||
|
- int retval;
|
||
|
-
|
||
|
- retval = _llseek(fd,
|
||
|
- ((unsigned long long)offset) >> 32,
|
||
|
- ((unsigned long long)offset) & 0xffffffff,
|
||
|
- &result,
|
||
|
- whence);
|
||
|
- return (retval==-1 ? (loff_t) retval : result);
|
||
|
+ return lseek64(fd, offset, whence);
|
||
|
}
|
||
|
|
||
|
#endif /* SIZEOF_OFF_T < 8 */
|