diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-29 23:55:30 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-29 23:55:30 +0000 |
| commit | 43f0a0bb3a178794ac9fa3f5010db680c5d1b018 (patch) | |
| tree | 7f3c2fae714d8260c100fbad6627c7ae4e8c43fe /util-linux | |
| parent | e755e827f7c8ecb21787a4369d7afdeda54d112b (diff) | |
| download | busybox-w32-1_7_2.tar.gz busybox-w32-1_7_2.tar.bz2 busybox-w32-1_7_2.zip | |
apply all post-1.7.1 patches, set version to 1.7.21_7_2
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/fdisk.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 2a91a8f2f..7981abc9f 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
| @@ -638,8 +638,16 @@ static void | |||
| 638 | seek_sector(ullong secno) | 638 | seek_sector(ullong secno) |
| 639 | { | 639 | { |
| 640 | secno *= sector_size; | 640 | secno *= sector_size; |
| 641 | #if ENABLE_FDISK_SUPPORT_LARGE_DISKS | ||
| 641 | if (lseek64(fd, (off64_t)secno, SEEK_SET) == (off64_t) -1) | 642 | if (lseek64(fd, (off64_t)secno, SEEK_SET) == (off64_t) -1) |
| 642 | fdisk_fatal(unable_to_seek); | 643 | fdisk_fatal(unable_to_seek); |
| 644 | #else | ||
| 645 | if (secno > MAXINT(off_t) | ||
| 646 | || lseek(fd, (off_t)secno, SEEK_SET) == (off_t) -1 | ||
| 647 | ) { | ||
| 648 | fdisk_fatal(unable_to_seek); | ||
| 649 | } | ||
| 650 | #endif | ||
| 643 | } | 651 | } |
| 644 | 652 | ||
| 645 | #if ENABLE_FEATURE_FDISK_WRITABLE | 653 | #if ENABLE_FEATURE_FDISK_WRITABLE |
