From: Roberto Angelino <rangelino@xxxxxxxxxx> Signed-off-by: Petr Uzel <petr.uzel@xxxxxxx> --- fdisk/sfdisk.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c index 6cd85a2..4ed5d37 100644 --- a/fdisk/sfdisk.c +++ b/fdisk/sfdisk.c @@ -1293,6 +1293,17 @@ partitions_ok(struct disk_desc *z) { } } + /* Are the partitions within the DOS 2TiB limit? */ + { + for (p = partitions; p < partitions + partno; p++) + if (p->size > (unsigned long) UINT32_MAX) { + my_warn(_("Warning: partition %s of size %lu sectors exceeds " + "msdos 2TiB limit\n"), + PNO(p), p->size); + return 0; + } + } + /* At most one chain of DOS extended partitions ? */ /* It seems that the OS/2 fdisk has the additional requirement that the extended partition must be the fourth one */ -- 1.7.3.4 Petr -- Petr Uzel IRC: ptr_uzl @ freenode
Attachment:
pgpQwlT95ijio.pgp
Description: PGP signature