lib/conf: make INI deprecation less verbose
spdk_conf_allocate() was not the best place to put
INI deprecation warning.
Depending on the application, config could be allocated
without passing config file.
This resulted in app framework applications to print
this error on startup even without config file.
Much better place is spdk_conf_read() which requires
a file to be passed. Then and only then, deprecation
warning is printed with this patch.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2051 (master)
(cherry picked from commit 6395370be1
)
Change-Id: I75979655880f9273dfe5ce65262f08934df596cc
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2068
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
c0bf57f87d
commit
b47e2267cf
@ -71,7 +71,6 @@ static struct spdk_conf *default_config = NULL;
|
||||
struct spdk_conf *
|
||||
spdk_conf_allocate(void)
|
||||
{
|
||||
SPDK_ERRLOG("INI configuration has been deprecated and will be removed in a future release. Please switch to JSON-RPC.\n");
|
||||
return calloc(1, sizeof(struct spdk_conf));
|
||||
}
|
||||
|
||||
@ -611,6 +610,7 @@ spdk_conf_read(struct spdk_conf *cp, const char *file)
|
||||
if (file == NULL || file[0] == '\0') {
|
||||
return -1;
|
||||
}
|
||||
SPDK_ERRLOG("INI configuration has been deprecated and will be removed in a future release. Please switch to JSON-RPC.\n");
|
||||
|
||||
fp = fopen(file, "r");
|
||||
if (fp == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user