diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-05-02 14:26:21 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-06-12 18:42:22 +0200 |
commit | 309a747fa6cfeac0a0165543f23a924866727c9b (patch) | |
tree | a51242aa3ac87243c0614bf93d27e9083182e485 /src/import | |
parent | json: merge json_dispatch_path() + json_dispatch_absolute_path() (diff) | |
download | systemd-309a747fa6cfeac0a0165543f23a924866727c9b.tar.xz systemd-309a747fa6cfeac0a0165543f23a924866727c9b.zip |
libsystemd: turn json.[ch] into a public API
This is preparation for making our Varlink API a public API. Since our
Varlink API is built on top of our JSON API we need to make that public
first (it's a nice API, but JSON APIs there are already enough, this is
purely about the Varlink angle).
I made most of the json.h APIs public, and just placed them in
sd-json.h. Sometimes I wasn't so sure however, since the underlying data
structures would have to be made public too. If in doubt I didn#t risk
it, and moved the relevant API to src/libsystemd/sd-json/json-util.h
instead (without any sd_* symbol prefixes).
This is mostly a giant search/replace patch.
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/importctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/import/importctl.c b/src/import/importctl.c index f939d80815..d81e79e3cd 100644 --- a/src/import/importctl.c +++ b/src/import/importctl.c @@ -42,7 +42,7 @@ static bool arg_quiet = false; static bool arg_ask_password = true; static ImportVerify arg_verify = IMPORT_VERIFY_SIGNATURE; static const char* arg_format = NULL; -static JsonFormatFlags arg_json_format_flags = JSON_FORMAT_OFF; +static sd_json_format_flags_t arg_json_format_flags = SD_JSON_FORMAT_OFF; static ImageClass arg_image_class = _IMAGE_CLASS_INVALID; #define PROGRESS_PREFIX "Total: " @@ -932,7 +932,7 @@ static int list_images(int argc, char *argv[], void *userdata) { if (r < 0) return table_log_add_error(r); - if (FLAGS_SET(arg_json_format_flags, JSON_FORMAT_OFF)) + if (FLAGS_SET(arg_json_format_flags, SD_JSON_FORMAT_OFF)) r = table_add_many( t, TABLE_STRING, read_only ? "ro" : "rw", @@ -1151,7 +1151,7 @@ static int parse_argv(int argc, char *argv[]) { break; case 'j': - arg_json_format_flags = JSON_FORMAT_PRETTY_AUTO|JSON_FORMAT_COLOR_AUTO; + arg_json_format_flags = SD_JSON_FORMAT_PRETTY_AUTO|SD_JSON_FORMAT_COLOR_AUTO; arg_legend = false; break; |