]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
userdbctl: don't show legend when dumping JSON with services
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 24 Mar 2023 14:19:21 +0000 (15:19 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 24 Mar 2023 14:19:21 +0000 (15:19 +0100)
src/userdb/userdbctl.c

index b728cdc1c369d5100efa5be2c70f64c745bfacb6..86b8d383df06e5b380bb3d9793ed3069d917d41f 100644 (file)
@@ -962,7 +962,7 @@ static int display_services(int argc, char *argv[], void *userdata) {
                         return table_log_print_error(r);
         }
 
-        if (arg_legend) {
+        if (arg_legend && arg_output != OUTPUT_JSON) {
                 if (table_get_rows(t) > 1)
                         printf("\n%zu services listed.\n", table_get_rows(t) - 1);
                 else