diff options
author | Matt Wilson <msw@redhat.com> | 2000-05-12 22:26:07 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-05-12 22:26:07 +0000 |
commit | ee9c3d63b19640a938661ed4ec235d0da2004bb2 (patch) | |
tree | 473990aa1ad4febdfaab7cd2f34b9862470b9886 /balkan | |
parent | 9772a2eb1fdb4e3adf5c0d7954ecaf4f624f0f58 (diff) | |
download | anaconda-ee9c3d63b19640a938661ed4ec235d0da2004bb2.tar.gz anaconda-ee9c3d63b19640a938661ed4ec235d0da2004bb2.tar.xz anaconda-ee9c3d63b19640a938661ed4ec235d0da2004bb2.zip |
lseek64
Diffstat (limited to 'balkan')
-rw-r--r-- | balkan/balkan.h | 2 | ||||
-rw-r--r-- | balkan/bsdlabel.c | 2 | ||||
-rw-r--r-- | balkan/dos.c | 4 | ||||
-rw-r--r-- | balkan/sun.c | 4 | ||||
-rwxr-xr-x | balkan/testit | 2 |
5 files changed, 5 insertions, 9 deletions
diff --git a/balkan/balkan.h b/balkan/balkan.h index dcc95c0a8..4113432f3 100644 --- a/balkan/balkan.h +++ b/balkan/balkan.h @@ -1,6 +1,8 @@ #ifndef H_BALKAN #define H_BALKAN 1 +#define _LARGEFILE64_SOURCE 1 + #define BALKAN_ERROR_ERRNO 1 #define BALKAN_ERROR_BADMAGIC 2 #define BALKAN_ERROR_BADTABLE 3 diff --git a/balkan/bsdlabel.c b/balkan/bsdlabel.c index 7856471fd..505c44c3e 100644 --- a/balkan/bsdlabel.c +++ b/balkan/bsdlabel.c @@ -53,8 +53,6 @@ struct bsd_disklabel { } d_partitions[BSD_MAXPARTITIONS]; /* actually may be more */ }; -long long llseek(int fd, long long offset, int whence); - #if 0 static unsigned short xbsd_dkcksum (struct bsd_disklabel *lp) { unsigned short *start, *end; diff --git a/balkan/dos.c b/balkan/dos.c index 666d1c0e2..e3297d25b 100644 --- a/balkan/dos.c +++ b/balkan/dos.c @@ -33,14 +33,12 @@ struct singlePartitionTable { #define WINP_TYPE_EXTENDED 0xf #define LINUX_TYPE_EXTENDED 0x85 -long long llseek(int fd, long long offset, int whence); - static int readSingleTable(int fd, struct singlePartitionTable * table, long long partSector) { unsigned char sector[SECTOR_SIZE]; unsigned short magic; - if (llseek(fd, ((long long) SECTOR_SIZE * (long long) partSector), + if (lseek64(fd, ((long long) SECTOR_SIZE * (long long) partSector), SEEK_SET) < 0) return BALKAN_ERROR_ERRNO; diff --git a/balkan/sun.c b/balkan/sun.c index b0cdfa3a5..d3c11703b 100644 --- a/balkan/sun.c +++ b/balkan/sun.c @@ -39,8 +39,6 @@ struct singlePartitionTable { #define WHOLE_DISK 5 #define UFS_SUPER_MAGIC 0x00011954 -long long llseek(int fd, long long offset, int whence); - int sunpReadTable(int fd, struct partitionTable * table) { struct singlePartitionTable singleTable; int i, rc, magic; @@ -99,7 +97,7 @@ int sunpReadTable(int fd, struct partitionTable * table) { default: if (table->parts[i].type != WHOLE_DISK && - llseek(fd, (8192 + 0x55c + SECTOR_SIZE * + lseek64(fd, (8192 + 0x55c + SECTOR_SIZE * (unsigned long long)table->parts[i].startSector), SEEK_SET) >= 0 && read(fd, &magic, 4) == 4 && diff --git a/balkan/testit b/balkan/testit index f53f9776b..bd1bb0c39 100755 --- a/balkan/testit +++ b/balkan/testit @@ -2,7 +2,7 @@ import _balkan -p = _balkan.readTable('/dev/sdc') +p = _balkan.readTable('/dev/hda') for i in range(0, len(p) - 1): (type, start, size) = p[i] |