]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (bsd) fix output
authorKarel Zak <kzak@redhat.com>
Tue, 11 Mar 2014 11:33:30 +0000 (12:33 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 11 Mar 2014 11:33:30 +0000 (12:33 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/bsd.c
tests/expected/fdisk/bsd

index d24c10434829618371806add261640f5f61e5c91..a9ce650f2092d0362fce7884bd75cb3945034dbb 100644 (file)
@@ -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 },
index addc7459e26f86506a9421827ba1e1a9476a8319..d71c7723b9b62b376da092226a66ae312a561e3d 100644 (file)
@@ -25,8 +25,8 @@ I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: dos
 Disk identifier: <removed>
 
-Device     Boot Start       End Blocks  Id System
-<removed>1       2048      4095   1024  83 Linux
+Device     Boot Start   End Sectors Size Id Type
+<removed>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: <removed>
 
-Device     Boot Start       End Blocks  Id System
-<removed>1       2048      4095   1024  83 Linux
-<removed>2       4096     20479   8192  a5 FreeBSD
+Device     Boot Start   End Sectors Size Id Type
+<removed>1       2048  4095    2048   1M 83 Linux
+<removed>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): 
 -------------------