diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-02-07 20:59:06 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-02-07 20:59:06 +0000 |
commit | d75c8be7b9defae98c3678c4eda6fb3bbf1c8872 (patch) | |
tree | 7159e005f815fe11febcfa9e2096fd83c7b34912 /isys | |
parent | cfa4a1947cf7965e25e241f6e9a434582fc4eb72 (diff) | |
download | anaconda-d75c8be7b9defae98c3678c4eda6fb3bbf1c8872.tar.gz anaconda-d75c8be7b9defae98c3678c4eda6fb3bbf1c8872.tar.xz anaconda-d75c8be7b9defae98c3678c4eda6fb3bbf1c8872.zip |
patch from nalin@redhat.com to fix much silliness here
Diffstat (limited to 'isys')
-rw-r--r-- | isys/pdc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/isys/pdc.c b/isys/pdc.c index c69e5252e..c0ef3e41e 100644 --- a/isys/pdc.c +++ b/isys/pdc.c @@ -90,7 +90,7 @@ struct promise_raid_conf { }; -static unsigned long calc_pdcblock_offset (int fd) { +static unsigned long long calc_pdcblock_offset (int fd) { unsigned long lba = 0; struct hd_big_geometry g; long sectors; @@ -128,11 +128,11 @@ static int read_disk_sb (int fd, unsigned char *buffer,int bufsize) * Calculate the position of the superblock, * it's at first sector of the last cylinder */ - sb_offset = calc_pdcblock_offset(fd) * 512; - if (sb_offset == -1) + sb_offset = calc_pdcblock_offset(fd); + if (sb_offset == ((unsigned long long) -1)) return -1; - - lseek64(fd, sb_offset, SEEK_SET); + + lseek64(fd, sb_offset * 512, SEEK_SET); read (fd, buffer, bufsize); ret = 0; |