libfdisk: do not reset default if undefined by script
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
35d5db6ebb
commit
9f17b992e3
|
@ -758,7 +758,9 @@ static int count_first_last_lba(struct fdisk_context *cxt,
|
|||
/* Get the table length from the script, if given */
|
||||
if (cxt->script) {
|
||||
rc = get_script_u64(cxt, &nents, "table-length");
|
||||
if (rc < 0)
|
||||
if (rc == 1)
|
||||
nents = GPT_NPARTITIONS; /* undefined by script */
|
||||
else if (rc < 0)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue