summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/sun.c
diff options
context:
space:
mode:
Diffstat (limited to 'libfdisk/src/sun.c')
-rw-r--r--libfdisk/src/sun.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c
index dde9750..cd965ab 100644
--- a/libfdisk/src/sun.c
+++ b/libfdisk/src/sun.c
@@ -35,7 +35,7 @@ struct fdisk_sun_label {
struct sun_disklabel *header; /* on-disk data (pointer to cxt->firstsector) */
};
-static struct fdisk_parttype sun_parttypes[] = {
+static const struct fdisk_parttype sun_parttypes[] = {
{SUN_TAG_UNASSIGNED, N_("Unassigned")},
{SUN_TAG_BOOT, N_("Boot")},
{SUN_TAG_ROOT, N_("SunOS root")},
@@ -383,6 +383,10 @@ static void fetch_sun(struct fdisk_context *cxt,
lens[i] = 0;
}
}
+ for (i = cxt->label->nparts_max; i < SUN_MAXPARTITIONS; i++) {
+ starts[i] = 0;
+ lens[i] = 0;
+ }
}
/* non-Linux qsort_r(3) has usually differently ordered arguments */