summaryrefslogtreecommitdiffstats
path: root/src/userdb/userdbctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/userdb/userdbctl.c')
-rw-r--r--src/userdb/userdbctl.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/userdb/userdbctl.c b/src/userdb/userdbctl.c
index 1718419407..b2013bf80d 100644
--- a/src/userdb/userdbctl.c
+++ b/src/userdb/userdbctl.c
@@ -36,7 +36,7 @@ static PagerFlags arg_pager_flags = 0;
static bool arg_legend = true;
static char** arg_services = NULL;
static UserDBFlags arg_userdb_flags = 0;
-static JsonFormatFlags arg_json_format_flags = JSON_FORMAT_OFF;
+static sd_json_format_flags_t arg_json_format_flags = SD_JSON_FORMAT_OFF;
static bool arg_chain = false;
STATIC_DESTRUCTOR_REGISTER(arg_services, strv_freep);
@@ -86,7 +86,7 @@ static int show_user(UserRecord *ur, Table *table) {
break;
case OUTPUT_JSON:
- json_variant_dump(ur->json, arg_json_format_flags, NULL, 0);
+ sd_json_variant_dump(ur->json, arg_json_format_flags, NULL, 0);
break;
case OUTPUT_FRIENDLY:
@@ -486,7 +486,7 @@ static int show_group(GroupRecord *gr, Table *table) {
}
case OUTPUT_JSON:
- json_variant_dump(gr->json, arg_json_format_flags, NULL, 0);
+ sd_json_variant_dump(gr->json, arg_json_format_flags, NULL, 0);
break;
case OUTPUT_FRIENDLY:
@@ -780,15 +780,15 @@ static int show_membership(const char *user, const char *group, Table *table) {
break;
case OUTPUT_JSON: {
- _cleanup_(json_variant_unrefp) JsonVariant *v = NULL;
+ _cleanup_(sd_json_variant_unrefp) sd_json_variant *v = NULL;
- r = json_build(&v, JSON_BUILD_OBJECT(
- JSON_BUILD_PAIR("user", JSON_BUILD_STRING(user)),
- JSON_BUILD_PAIR("group", JSON_BUILD_STRING(group))));
+ r = sd_json_build(&v, SD_JSON_BUILD_OBJECT(
+ SD_JSON_BUILD_PAIR("user", SD_JSON_BUILD_STRING(user)),
+ SD_JSON_BUILD_PAIR("group", SD_JSON_BUILD_STRING(group))));
if (r < 0)
return log_error_errno(r, "Failed to build JSON object: %m");
- json_variant_dump(v, arg_json_format_flags, NULL, NULL);
+ sd_json_variant_dump(v, arg_json_format_flags, NULL, NULL);
break;
}
@@ -1200,7 +1200,7 @@ static int parse_argv(int argc, char *argv[]) {
} else
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid --output= mode: %s", optarg);
- arg_json_format_flags = arg_output == OUTPUT_JSON ? JSON_FORMAT_PRETTY|JSON_FORMAT_COLOR_AUTO : JSON_FORMAT_OFF;
+ arg_json_format_flags = arg_output == OUTPUT_JSON ? SD_JSON_FORMAT_PRETTY|SD_JSON_FORMAT_COLOR_AUTO : SD_JSON_FORMAT_OFF;
break;
case ARG_JSON:
@@ -1208,11 +1208,11 @@ static int parse_argv(int argc, char *argv[]) {
if (r <= 0)
return r;
- arg_output = FLAGS_SET(arg_json_format_flags, JSON_FORMAT_OFF) ? _OUTPUT_INVALID : OUTPUT_JSON;
+ arg_output = FLAGS_SET(arg_json_format_flags, SD_JSON_FORMAT_OFF) ? _OUTPUT_INVALID : OUTPUT_JSON;
break;
case 'j':
- arg_json_format_flags = JSON_FORMAT_PRETTY|JSON_FORMAT_COLOR_AUTO;
+ arg_json_format_flags = SD_JSON_FORMAT_PRETTY|SD_JSON_FORMAT_COLOR_AUTO;
arg_output = OUTPUT_JSON;
break;