diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-19 00:45:05 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-22 16:30:42 +0200 |
commit | 1fc464f6fbecfc5d8ba9f7b98d19e21fb324bfb9 (patch) | |
tree | cab3dbcc5f1c9bd4bde7601cf2163f7fa73ae860 /src/machine | |
parent | 3ade55d31b6154e4da184dd08ad76ae1ea285f22 (diff) |
cgtop: underline table header
Let's underline the header line of the table shown by cgtop, how it is
customary for tables. In order to do this, let's introduce new ANSI
underline macros, and clean up the existing ones as side effect.
Diffstat (limited to 'src/machine')
-rw-r--r-- | src/machine/machinectl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index ab113efb28..d276fbe956 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -327,7 +327,7 @@ static int list_images(int argc, char *argv[], void *userdata) { printf("%-*s %-*s %s%-3s%s %-*s %-*s %-*s\n", (int) max_name, images[j].name, (int) max_type, images[j].type, - images[j].read_only ? ansi_highlight_red() : "", yes_no(images[j].read_only), images[j].read_only ? ansi_highlight_off() : "", + images[j].read_only ? ansi_highlight_red() : "", yes_no(images[j].read_only), images[j].read_only ? ansi_normal() : "", (int) max_size, strna(format_bytes(size_buf, sizeof(size_buf), images[j].size)), (int) max_crtime, strna(format_timestamp(crtime_buf, sizeof(crtime_buf), images[j].crtime)), (int) max_mtime, strna(format_timestamp(mtime_buf, sizeof(mtime_buf), images[j].mtime))); @@ -793,7 +793,7 @@ static void print_image_status_info(sd_bus *bus, ImageStatusInfo *i) { printf("\t RO: %s%s%s\n", i->read_only ? ansi_highlight_red() : "", i->read_only ? "read-only" : "writable", - i->read_only ? ansi_highlight_off() : ""); + i->read_only ? ansi_normal() : ""); s1 = format_timestamp_relative(ts_relative, sizeof(ts_relative), i->crtime); s2 = format_timestamp(ts_absolute, sizeof(ts_absolute), i->crtime); |