app: fixup default values in the usage text
In the usage output, the default config could be printed as "(null)" and mem_size as "-1MB". Change-Id: Ib6adc1ab86c43a40096d392bdfc64d3d508a86bc Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/432422 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
6f5840d225
commit
70ef3d917f
@ -701,7 +701,8 @@ usage(void (*app_usage)(void))
|
|||||||
{
|
{
|
||||||
printf("%s [options]\n", g_executable_name);
|
printf("%s [options]\n", g_executable_name);
|
||||||
printf("options:\n");
|
printf("options:\n");
|
||||||
printf(" -c, --config <config> config file (default %s)\n", g_default_opts.config_file);
|
printf(" -c, --config <config> config file (default %s)\n",
|
||||||
|
g_default_opts.config_file != NULL ? g_default_opts.config_file : "none");
|
||||||
printf(" -d, --limit-coredump do not set max coredump size to RLIM_INFINITY\n");
|
printf(" -d, --limit-coredump do not set max coredump size to RLIM_INFINITY\n");
|
||||||
printf(" -e, --tpoint-group-mask <mask>\n");
|
printf(" -e, --tpoint-group-mask <mask>\n");
|
||||||
printf(" tracepoint group mask for spdk trace buffers (default 0x0)\n");
|
printf(" tracepoint group mask for spdk trace buffers (default 0x0)\n");
|
||||||
@ -720,7 +721,7 @@ usage(void (*app_usage)(void))
|
|||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
printf("%dMB)\n", g_default_opts.mem_size);
|
printf("%dMB)\n", g_default_opts.mem_size >= 0 ? g_default_opts.mem_size : 0);
|
||||||
}
|
}
|
||||||
printf(" --silence-noticelog disable notice level logging to stderr\n");
|
printf(" --silence-noticelog disable notice level logging to stderr\n");
|
||||||
printf(" -u, --no-pci disable PCI access\n");
|
printf(" -u, --no-pci disable PCI access\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user