Skip to content

Commit 52de785

Browse files
committed
fabrics: sanitize dump-config output
Trivial fix to sanitize the dump-config output by appending a new line at the end. Signed-off-by: Martin George <[email protected]> Signed-off-by: Daniel Wagner <[email protected]>
1 parent db98267 commit 52de785

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/nvme/json.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,10 @@ int json_update_config(nvme_root_t r, const char *config_file)
318318
json_object_put(subsys_array);
319319
json_object_array_add(json_root, host_obj);
320320
}
321-
if (!config_file)
321+
if (!config_file) {
322322
ret = json_object_to_fd(1, json_root, JSON_C_TO_STRING_PRETTY);
323-
else
323+
printf("\n");
324+
} else
324325
ret = json_object_to_file_ext(config_file, json_root,
325326
JSON_C_TO_STRING_PRETTY);
326327
if (ret < 0) {

0 commit comments

Comments
 (0)