diff --git a/p2v/kernel.c b/p2v/kernel.c index 01e32db7e..cf77a6f57 100644 --- a/p2v/kernel.c +++ b/p2v/kernel.c @@ -243,6 +243,11 @@ kernel_conversion (struct config *config, char **cmdline, int cmdline_source) exit (EXIT_FAILURE); } + ansi_green (stdout); + printf ("Conversion finished successfully."); + ansi_restore (stdout); + putchar ('\n'); + p = get_cmdline_key (cmdline, "p2v.post"); if (!p) { if (geteuid () == 0 && cmdline_source == CMDLINE_SOURCE_PROC_CMDLINE) @@ -257,8 +262,12 @@ notify_ui_callback (int type, const char *data) { switch (type) { case NOTIFY_LOG_DIR: - printf ("%s: remote log directory location: %s\n", - guestfs_int_program_name, data); + ansi_magenta (stdout); + printf ("%s: remote log directory location: ", guestfs_int_program_name); + ansi_red (stdout); + fputs (data, stdout); + ansi_restore (stdout); + putchar ('\n'); break; case NOTIFY_REMOTE_MESSAGE: @@ -266,12 +275,18 @@ notify_ui_callback (int type, const char *data) break; case NOTIFY_STATUS: - printf ("%s: %s\n", guestfs_int_program_name, data); + ansi_magenta (stdout); + printf ("%s: %s", guestfs_int_program_name, data); + ansi_restore (stdout); + putchar ('\n'); break; default: - printf ("%s: unknown message during conversion: type=%d data=%s\n", + ansi_red (stdout); + printf ("%s: unknown message during conversion: type=%d data=%s", guestfs_int_program_name, type, data); + ansi_restore (stdout); + putchar ('\n'); } fflush (stdout); diff --git a/p2v/launch-virt-p2v.in b/p2v/launch-virt-p2v.in index 65481e460..454e9f440 100755 --- a/p2v/launch-virt-p2v.in +++ b/p2v/launch-virt-p2v.in @@ -23,7 +23,7 @@ cmdline=$(, parse the string parameter C. +=item B<--colors> + +=item B<--colours> + +Use ANSI colour sequences to colourize messages. This is the default +when the output is a tty. If the output of the program is redirected +to a file, ANSI colour sequences are disabled unless you use this +option. + =item B<--iso> This flag is passed to virt-p2v when it is launched inside the