From ffcf0540412eb532be3a446c9f6f1dc1bd16e20c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 17 Sep 2013 09:42:53 +0200 Subject: fdisk: add debug message, use colors for -l Signed-off-by: Karel Zak --- fdisks/fdisk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fdisks/fdisk.c') diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c index 368c89ed0..9b7487613 100644 --- a/fdisks/fdisk.c +++ b/fdisks/fdisk.c @@ -487,9 +487,12 @@ int main(int argc, char **argv) warnx(_("The device properties (sector size and geometry) should" " be used with one specified device only.")); + colors_init(colormode); + switch (act) { case ACT_LIST: fdisk_context_enable_listonly(cxt, 1); + if (argc > optind) { int k; for (k = optind; k < argc; k++) @@ -515,8 +518,6 @@ int main(int argc, char **argv) if (argc-optind != 1) usage(stderr); - colors_init(colormode); - if (fdisk_context_assign_device(cxt, argv[optind], 0) != 0) err(EXIT_FAILURE, _("cannot open %s"), argv[optind]); -- cgit v1.2.3-55-g7522