diff options
Diffstat (limited to 'fdisk/cfdisk.c')
-rw-r--r-- | fdisk/cfdisk.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c index ae1f50a1..5ee14d39 100644 --- a/fdisk/cfdisk.c +++ b/fdisk/cfdisk.c @@ -2459,11 +2459,19 @@ draw_partition(int i) { if (p_info[i].id > 0) { char *dbn = my_basename(disk_device); int l = strlen(dbn); - int digit_last = isdigit(dbn[l-1]); +#ifdef __sun__ + /* XXX: Whole disk is c0t0d0p0, but patitions are c0t0d0p1, c0t0d0p2, etc */ + dbn[l-1] = '\0'; /* Cutoff '0' */ + mvprintw(y, NAME_START, + "%s%d", dbn, p_info[i].num+1); + dbn[l-1] = '0'; /* Restore '0' */ +#else + int digit_last = isdigit(dbn[l-1]); mvprintw(y, NAME_START, "%s%s%d", dbn, (digit_last ? "p" : ""), p_info[i].num+1); +#endif if (p_info[i].flags) { if (p_info[i].flags == ACTIVE_FLAG) mvaddstr(y, FLAGS_START, _("Boot")); |