]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: allow --no-legend with architectures verb
authorLuca Boccassi <bluca@debian.org>
Wed, 27 Dec 2023 16:49:17 +0000 (17:49 +0100)
committerLuca Boccassi <bluca@debian.org>
Wed, 27 Dec 2023 16:50:07 +0000 (17:50 +0100)
It prints a table with a header, allow omitting it

Follow-up for fb8cc599ed863502d67

src/analyze/analyze.c

index 005846fdeee3bb99e444ab450b8e4c5035fec264..6edc412e751b75e6f47da06f7d39206b6d4242b8 100644 (file)
@@ -597,7 +597,7 @@ static int parse_argv(int argc, char *argv[]) {
         if (streq_ptr(argv[optind], "condition") && arg_unit && optind < argc - 1)
                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "No conditions can be passed if --unit= is used.");
 
-        if ((!arg_legend && !streq_ptr(argv[optind], "plot")) ||
+        if ((!arg_legend && !STRPTR_IN_SET(argv[optind], "plot", "architectures")) ||
            (streq_ptr(argv[optind], "plot") && !arg_legend && !arg_table && FLAGS_SET(arg_json_format_flags, JSON_FORMAT_OFF)))
                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Option --no-legend is only supported for plot with either --table or --json=.");