diff --git a/userspace/include/unit/core.h b/userspace/include/unit/core.h index d9d119dbd..b47b64559 100644 --- a/userspace/include/unit/core.h +++ b/userspace/include/unit/core.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -59,5 +59,5 @@ struct unit_fw { int core_load_nvgpu(struct unit_fw *fw); int core_exec(struct unit_fw *fw); - +int verbose_lvl(struct unit_module *module); #endif diff --git a/userspace/libnvgpu-unit.export b/userspace/libnvgpu-unit.export index 4238b30ca..3344963d4 100644 --- a/userspace/libnvgpu-unit.export +++ b/userspace/libnvgpu-unit.export @@ -1,5 +1,6 @@ -# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. __core_print_stdout __core_print_stderr __unit_info_color +verbose_lvl diff --git a/userspace/src/module.c b/userspace/src/module.c index d88b392cd..110df949d 100644 --- a/userspace/src/module.c +++ b/userspace/src/module.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -213,3 +213,9 @@ err: closedir(load_dir); return NULL; } + +/* Return the current verbosity level */ +int verbose_lvl(struct unit_module *module) +{ + return module->fw->args->verbose_lvl; +}