diff options
| author | Karel Zak <kzak@redhat.com> | 2013-07-10 17:00:11 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2013-09-16 16:47:07 +0200 |
| commit | e563f05525f112148c004676f234db832cfcb8ef (patch) | |
| tree | 59be890f30d8ba31b49ed6e30439e415b6888520 /fdisks/fdisk.c | |
| parent | bcef4db44395702fa2a8051c94bb34e55649fcd3 (diff) | |
| download | util-linux-e563f05525f112148c004676f234db832cfcb8ef.tar.gz | |
fdisk: (bsd) rewrite list disklabel function
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/fdisk.c')
| -rw-r--r-- | fdisks/fdisk.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c index 36f43619..a27d64ee 100644 --- a/fdisks/fdisk.c +++ b/fdisks/fdisk.c @@ -256,15 +256,10 @@ static void list_disk_geometry(struct fdisk_context *cxt) printf("\n"); } -static void list_table(struct fdisk_context *cxt, int xtra) +static void list_table(struct fdisk_context *cxt) { list_disk_geometry(cxt); - - if (fdisk_is_disklabel(cxt, BSD)) - xbsd_print_disklabel(cxt, xtra); - else - fdisk_list_disklabel(cxt); - + fdisk_list_disklabel(cxt); } static void verify(struct fdisk_context *cxt) @@ -401,7 +396,7 @@ expert_command_prompt(struct fdisk_context *cxt) fdisk_create_disklabel(cxt, "sgi"); break; case 'p': - list_table(cxt, 1); + list_table(cxt); break; case 'q': handle_quit(cxt); @@ -439,7 +434,7 @@ static void print_partition_table_from_option( err(EXIT_FAILURE, _("cannot open %s"), device); if (fdisk_dev_has_disklabel(cxt)) - list_table(cxt, 0); + list_table(cxt); else list_disk_geometry(cxt); } @@ -557,7 +552,7 @@ static void command_prompt(struct fdisk_context *cxt) fdisk_create_disklabel(cxt, "dos"); break; case 'p': - list_table(cxt, 0); + list_table(cxt); break; case 'q': handle_quit(cxt); |
