summaryrefslogtreecommitdiffstats
path: root/disk-utils/fdisk.c
diff options
context:
space:
mode:
authorKarel Zak2014-05-12 10:22:09 +0200
committerKarel Zak2014-05-13 12:13:02 +0200
commit496c979a09899fac38b82e4b8d10bc4700407157 (patch)
tree31d286a746acf09b9463373efc28e058690244bf /disk-utils/fdisk.c
parenthexdump: add --color to the man page (diff)
downloadkernel-qcow2-util-linux-496c979a09899fac38b82e4b8d10bc4700407157.tar.gz
kernel-qcow2-util-linux-496c979a09899fac38b82e4b8d10bc4700407157.tar.xz
kernel-qcow2-util-linux-496c979a09899fac38b82e4b8d10bc4700407157.zip
fdisk: support colors customization
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/fdisk.c')
-rw-r--r--disk-utils/fdisk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c
index 8762a7ac8..7df6b899d 100644
--- a/disk-utils/fdisk.c
+++ b/disk-utils/fdisk.c
@@ -338,13 +338,13 @@ int ask_callback(struct fdisk_context *cxt, struct fdisk_ask *ask,
fputs_info(ask, stdout);
break;
case FDISK_ASKTYPE_WARNX:
- color_fenable(UL_COLOR_RED, stderr);
+ color_scheme_fenable("warn", UL_COLOR_RED, stderr);
fputs(fdisk_ask_print_get_mesg(ask), stderr);
color_fdisable(stderr);
fputc('\n', stderr);
break;
case FDISK_ASKTYPE_WARN:
- color_fenable(UL_COLOR_RED, stderr);
+ color_scheme_fenable("warn", UL_COLOR_RED, stderr);
fputs(fdisk_ask_print_get_mesg(ask), stderr);
errno = fdisk_ask_print_get_errno(ask);
fprintf(stderr, ": %m\n");
@@ -579,7 +579,7 @@ void list_disklabel(struct fdisk_context *cxt)
char *next = strchr(str, '\n');
if (next && colors_wanted()) {
*next = '\0';
- color_enable(UL_COLOR_BOLD);
+ color_scheme_enable("header", UL_COLOR_BOLD);
fputs(p, stdout);
color_disable();
fputc('\n', stdout);
@@ -902,7 +902,7 @@ int main(int argc, char **argv)
usage(stderr);
/* Here starts interactive mode, use fdisk_{warn,info,..} functions */
- color_enable(UL_COLOR_GREEN);
+ color_scheme_enable("welcome", UL_COLOR_GREEN);
fdisk_info(cxt, _("Welcome to fdisk (%s)."), PACKAGE_STRING);
color_disable();
fdisk_info(cxt, _("Changes will remain in memory only, until you decide to write them.\n"