Skip to content

Commit

Permalink
Merge pull request #443 from martin-gpy/dump_output
Browse files Browse the repository at this point in the history
fabrics: sanitize dump-config output
  • Loading branch information
igaw authored Jul 23, 2022
2 parents db98267 + 52de785 commit 4b3cb08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/nvme/json.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,10 @@ int json_update_config(nvme_root_t r, const char *config_file)
json_object_put(subsys_array);
json_object_array_add(json_root, host_obj);
}
if (!config_file)
if (!config_file) {
ret = json_object_to_fd(1, json_root, JSON_C_TO_STRING_PRETTY);
else
printf("\n");
} else
ret = json_object_to_file_ext(config_file, json_root,
JSON_C_TO_STRING_PRETTY);
if (ret < 0) {
Expand Down

0 comments on commit 4b3cb08

Please sign in to comment.