lib/event: Fix no error info problem when reading spdk_tgt json file

When start spdk_tgt with json config file, if the file cannot be read,
there is no error message indicating what is wrong.

Change-Id: I4e0cbad5fb7a23b99f05ebdce7d0801eebbd63f7
Signed-off-by: Rui Chang <rui.chang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6042
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Rui Chang 2020-12-29 11:01:12 +08:00 committed by Tomasz Zawadzki
parent 75440d0537
commit 9a66df8102

View File

@ -527,6 +527,7 @@ app_json_config_read(const char *config_file, struct load_json_config_ctx *ctx)
json = read_file(config_file, &json_size); json = read_file(config_file, &json_size);
if (!json) { if (!json) {
SPDK_ERRLOG("Read JSON configuration file %s failed\n", config_file);
return -errno; return -errno;
} }