event: require opts->name is set
This has been implicitly required before, and all in-tree apps (except accel_perf) set it, so let's explicitly require it. This name gets used for things like the shm name for spdk trace event file. While here, add the name for accel_perf. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I47a22466550d4b31bacafee58d30339b4f22f4b4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13876 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Michal Berger <michal.berger@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
fa09c9ac9b
commit
5d651b31c9
@ -780,6 +780,7 @@ main(int argc, char **argv)
|
||||
|
||||
pthread_mutex_init(&g_workers_lock, NULL);
|
||||
spdk_app_opts_init(&opts, sizeof(opts));
|
||||
opts.name = "accel_perf";
|
||||
opts.reactor_mask = "0x1";
|
||||
if (spdk_app_parse_args(argc, argv, &opts, "a:C:o:q:t:yw:P:f:T:", NULL, parse_args,
|
||||
usage) != SPDK_APP_PARSE_ARGS_SUCCESS) {
|
||||
|
@ -523,6 +523,11 @@ spdk_app_start(struct spdk_app_opts *opts_user, spdk_msg_fn start_fn,
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (opts_user->name == NULL) {
|
||||
SPDK_ERRLOG("spdk_app_opts::name not specified\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
app_copy_opts(opts, opts_user, opts_user->opts_size);
|
||||
|
||||
if (!start_fn) {
|
||||
|
Loading…
Reference in New Issue
Block a user