diff options
Diffstat (limited to 'src/varlinkctl/varlinkctl.c')
-rw-r--r-- | src/varlinkctl/varlinkctl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/varlinkctl/varlinkctl.c b/src/varlinkctl/varlinkctl.c index b6c6c0da42..76c9e4850a 100644 --- a/src/varlinkctl/varlinkctl.c +++ b/src/varlinkctl/varlinkctl.c @@ -287,7 +287,7 @@ static int verb_info(int argc, char *argv[], void *userdata) { pager_open(arg_pager_flags); - if (FLAGS_SET(arg_json_format_flags, SD_JSON_FORMAT_OFF)) { + if (!sd_json_format_enabled(arg_json_format_flags)) { static const sd_json_dispatch_field dispatch_table[] = { { "vendor", SD_JSON_VARIANT_STRING, sd_json_dispatch_const_string, offsetof(GetInfoData, vendor), SD_JSON_MANDATORY }, { "product", SD_JSON_VARIANT_STRING, sd_json_dispatch_const_string, offsetof(GetInfoData, product), SD_JSON_MANDATORY }, @@ -426,7 +426,7 @@ static int verb_introspect(int argc, char *argv[], void *userdata) { if (r < 0) return r; - if (FLAGS_SET(arg_json_format_flags, SD_JSON_FORMAT_OFF) || list_methods) { + if (!sd_json_format_enabled(arg_json_format_flags) || list_methods) { static const sd_json_dispatch_field dispatch_table[] = { { "description", SD_JSON_VARIANT_STRING, sd_json_dispatch_const_string, 0, SD_JSON_MANDATORY }, {} @@ -478,7 +478,7 @@ static int verb_introspect(int argc, char *argv[], void *userdata) { strv_sort_uniq(methods); - if (FLAGS_SET(arg_json_format_flags, SD_JSON_FORMAT_OFF)) + if (!sd_json_format_enabled(arg_json_format_flags)) strv_print(methods); else { _cleanup_(sd_json_variant_unrefp) sd_json_variant *j = NULL; @@ -539,7 +539,7 @@ static int verb_call(int argc, char *argv[], void *userdata) { parameter = argc > 3 && !streq(argv[3], "-") ? argv[3] : NULL; /* No JSON mode explicitly configured? Then default to the same as -j */ - if (FLAGS_SET(arg_json_format_flags, SD_JSON_FORMAT_OFF)) { + if (!sd_json_format_enabled(arg_json_format_flags)) { arg_json_format_flags &= ~SD_JSON_FORMAT_OFF; arg_json_format_flags |= SD_JSON_FORMAT_PRETTY_AUTO|SD_JSON_FORMAT_COLOR_AUTO; } |