summaryrefslogtreecommitdiffstats
path: root/balkan
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-05-12 22:16:23 +0000
committerErik Troan <ewt@redhat.com>2000-05-12 22:16:23 +0000
commit1798911b3b96f739bbacd30c8ea232c794f5a600 (patch)
tree8292329f824147b66863900425700a601904dd56 /balkan
parent23e32da119329ee6fc529364169a55d8188bdb04 (diff)
downloadanaconda-1798911b3b96f739bbacd30c8ea232c794f5a600.tar.gz
anaconda-1798911b3b96f739bbacd30c8ea232c794f5a600.tar.xz
anaconda-1798911b3b96f739bbacd30c8ea232c794f5a600.zip
lseek64() breaks things and I don't care why
Diffstat (limited to 'balkan')
-rw-r--r--balkan/bsdlabel.c4
-rw-r--r--balkan/dos.c4
-rw-r--r--balkan/sun.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/balkan/bsdlabel.c b/balkan/bsdlabel.c
index d2614e7ed..7856471fd 100644
--- a/balkan/bsdlabel.c
+++ b/balkan/bsdlabel.c
@@ -53,6 +53,8 @@ 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;
@@ -80,7 +82,7 @@ int bsdlReadTable(int fd, struct partitionTable * table) {
table->sectorSize = 512;
- if (lseek64(fd, BSD_LABEL_OFFSET, SEEK_SET) < 0)
+ if (lseek(fd, BSD_LABEL_OFFSET, SEEK_SET) < 0)
return BALKAN_ERROR_ERRNO;
if (read(fd, &label, sizeof(label)) != sizeof(label))
diff --git a/balkan/dos.c b/balkan/dos.c
index e3297d25b..666d1c0e2 100644
--- a/balkan/dos.c
+++ b/balkan/dos.c
@@ -33,12 +33,14 @@ 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 (lseek64(fd, ((long long) SECTOR_SIZE * (long long) partSector),
+ if (llseek(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 d3c11703b..b0cdfa3a5 100644
--- a/balkan/sun.c
+++ b/balkan/sun.c
@@ -39,6 +39,8 @@ 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;
@@ -97,7 +99,7 @@ int sunpReadTable(int fd, struct partitionTable * table) {
default:
if (table->parts[i].type != WHOLE_DISK &&
- lseek64(fd, (8192 + 0x55c + SECTOR_SIZE *
+ llseek(fd, (8192 + 0x55c + SECTOR_SIZE *
(unsigned long long)table->parts[i].startSector),
SEEK_SET) >= 0 &&
read(fd, &magic, 4) == 4 &&