* [kpartx] Use lseek64 instead of self-defined syscall
@ 2005-12-07 14:46 Hannes Reinecke
2005-12-07 22:53 ` Christophe Varoqui
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2005-12-07 14:46 UTC (permalink / raw)
To: christophe varoqui; +Cc: device-mapper development
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
Hi Christophe,
this patch enables kpartx to use lseek64 instead of a self-defined syscall.
Cheers,
Hannes
--
Dr. Hannes Reinecke hare@suse.de
SuSE Linux Products GmbH S390 & zSeries
Maxfeldstraße 5 +49 911 74053 688
90409 Nürnberg http://www.suse.de
[-- Attachment #2: kpartx-use-lseek64.patch --]
[-- Type: text/x-patch, Size: 2076 bytes --]
[kpartx] use lseek64 instead of self-defined syscall.
---
commit 400137e766f9585ae5d9038ce769810757e3b344
tree 0a9974d358e0f6443e23794b1f37b0609987f249
parent d43d7b77542d8459c30f82062f5c76954f124062
author Hannes Reinecke,SUSE LINUX GmbH; Maxfeldstrasse 5; D-90409 Nuernberg; Zi. 2.2-20,+49-911-740 53-688,,serv=wotan,mail=imap-dhs,type=real <hare@lammermuir.suse.de> Wed, 07 Dec 2005 15:44:56 +0100
committer Hannes Reinecke,SUSE LINUX GmbH; Maxfeldstrasse 5; D-90409 Nuernberg; Zi. 2.2-20,+49-911-740 53-688,,serv=wotan,mail=imap-dhs,type=real <hare@lammermuir.suse.de> Wed, 07 Dec 2005 15:44:56 +0100
kpartx/Makefile | 2 +-
kpartx/kpartx.c | 19 +++----------------
2 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/kpartx/Makefile b/kpartx/Makefile
--- a/kpartx/Makefile
+++ b/kpartx/Makefile
@@ -6,7 +6,7 @@ BUILD=glibc
include ../Makefile.inc
-CFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes -I.
+CFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes -I. -D_LARGEFILE64_SOURCE
ifeq ($(strip $(BUILD)),klibc)
OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o gpt.o crc32.o \
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
--- a/kpartx/kpartx.c
+++ b/kpartx/kpartx.c
@@ -465,27 +465,14 @@ xmalloc (size_t size) {
/*
* sseek: seek to specified sector
*/
-#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) \
- && !defined (__s390x__)
-#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);
+ off64_t in, out;
+ in = ((off64_t) secnr << 9);
out = 1;
-#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) \
- && !defined (__s390x__)
- if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0
- || out != in)
-#else
- if ((out = lseek(fd, in, SEEK_SET)) != in)
-#endif
+ if ((out = lseek64(fd, in, SEEK_SET)) != in)
{
fprintf(stderr, "llseek error\n");
return -1;
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [kpartx] Use lseek64 instead of self-defined syscall
2005-12-07 14:46 [kpartx] Use lseek64 instead of self-defined syscall Hannes Reinecke
@ 2005-12-07 22:53 ` Christophe Varoqui
0 siblings, 0 replies; 2+ messages in thread
From: Christophe Varoqui @ 2005-12-07 22:53 UTC (permalink / raw)
To: device-mapper development
On mer, 2005-12-07 at 15:46 +0100, Hannes Reinecke wrote:
> Hi Christophe,
>
> this patch enables kpartx to use lseek64 instead of a self-defined syscall.
>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-07 22:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-07 14:46 [kpartx] Use lseek64 instead of self-defined syscall Hannes Reinecke
2005-12-07 22:53 ` Christophe Varoqui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.