sfdisk would incorrectly complain that there was no room when partitioning
a drive over 2^31 sectors in size.
Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
delta = 0;
if (delta < 0) {
+ unsigned long old_size = p->size;
p->start -= delta;
p->size += delta;
if (is_extended(p->p.sys_type) && boxes == ONESECTOR)
p->size = inc;
- else if ((int)(p->size) <= 0) {
+ else if (old_size <= -delta) {
warn(_("no room for partition descriptor\n"));
return 0;
}