]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/machine/machinectl.c
cgtop: underline table header
[thirdparty/systemd.git] / src / machine / machinectl.c
index bb8c5ac64b6f92bbbf3eb779725ec6816287796e..d276fbe9560fc646e6191575ec07a4a0585f3693 100644 (file)
@@ -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)));
@@ -597,7 +597,7 @@ static void print_machine_status_info(sd_bus *bus, MachineStatusInfo *i) {
                 printf("\t    Unit: %s\n", i->unit);
                 show_unit_cgroup(bus, i->unit, i->leader);
 
-                if (arg_transport == BUS_TRANSPORT_LOCAL) {
+                if (arg_transport == BUS_TRANSPORT_LOCAL)
 
                         show_journal_by_unit(
                                         stdout,
@@ -611,7 +611,6 @@ static void print_machine_status_info(sd_bus *bus, MachineStatusInfo *i) {
                                         SD_JOURNAL_LOCAL_ONLY,
                                         true,
                                         NULL);
-                }
         }
 }
 
@@ -794,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);
@@ -2386,13 +2385,9 @@ static int set_limit(int argc, char *argv[], void *userdata) {
         if (streq(argv[argc-1], "-"))
                 limit = (uint64_t) -1;
         else {
-                off_t off;
-
-                r = parse_size(argv[argc-1], 1024, &off);
+                r = parse_size(argv[argc-1], 1024, &limit);
                 if (r < 0)
                         return log_error("Failed to parse size: %s", argv[argc-1]);
-
-                limit = (uint64_t) off;
         }
 
         if (argc > 2)