diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c index d24c10434..a9ce650f2 100644 --- a/libfdisk/src/bsd.c +++ b/libfdisk/src/bsd.c @@ -425,6 +425,8 @@ static int bsd_get_partition(struct fdisk_context *cxt, size_t n, pa->end_post = (p->p_offset + p->p_size) % d->d_secpercyl ? '*' : ' '; } + pa->start = p->p_offset; + pa->end = p->p_offset + p->p_size - 1; pa->size = p->p_size; pa->type = bsd_partition_parttype(cxt, p); @@ -879,9 +881,9 @@ static const struct fdisk_column bsd_columns[] = { FDISK_COL_DEVICE, N_("Slice"), 1, 0 }, { FDISK_COL_START, N_("Start"), 5, TT_FL_RIGHT }, { FDISK_COL_END, N_("End"), 5, TT_FL_RIGHT }, - { FDISK_COL_SIZE, N_("Size"), 5, TT_FL_RIGHT }, { FDISK_COL_SECTORS, N_("Sectors"), 5, TT_FL_RIGHT }, { FDISK_COL_CYLINDERS, N_("Cylinders"), 5, TT_FL_RIGHT }, + { FDISK_COL_SIZE, N_("Size"), 5, TT_FL_RIGHT }, { FDISK_COL_TYPE, N_("Type"), 8, 0 }, { FDISK_COL_FSIZE, N_("Fsize"), 5, TT_FL_RIGHT }, { FDISK_COL_BSIZE, N_("Bsize"), 5, TT_FL_RIGHT }, diff --git a/tests/expected/fdisk/bsd b/tests/expected/fdisk/bsd index addc7459e..d71c7723b 100644 --- a/tests/expected/fdisk/bsd +++ b/tests/expected/fdisk/bsd @@ -25,8 +25,8 @@ I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: -Device Boot Start End Blocks Id System -1 2048 4095 1024 83 Linux +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux ------------------- @@ -43,9 +43,9 @@ I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: -Device Boot Start End Blocks Id System -1 2048 4095 1024 83 Linux -2 4096 20479 8192 a5 FreeBSD +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 20479 16384 8M a5 FreeBSD ------------------- @@ -68,12 +68,11 @@ I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: bsd partitions: 4 -# Start End Size Type fsize bsize cpg -c 4096 20479 16384 unused 0 0 -d 0 16064 16065 unused 0 0 +Slice Start End Sectors Size Type Fsize Bsize Cpg +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.9M unused 0 0 0 -Command (m for help): -Leaving nested disklabel. +Command (m for help): Leaving nested disklabel. Command (m for help): ------------------- @@ -96,13 +95,12 @@ I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: bsd partitions: 4 -# Start End Size Type fsize bsize cpg -a 4096 6144 2049 4.2BSD 0 0 0 -c 4096 20479 16384 unused 0 0 -d 0 16064 16065 unused 0 0 +Slice Start End Sectors Size Type Fsize Bsize Cpg +a 4096 6144 2049 1M 4.2BSD 0 0 0 +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.9M unused 0 0 0 -Command (m for help): -Leaving nested disklabel. +Command (m for help): Leaving nested disklabel. Command (m for help): -------------------