Add a new pldm verbosity option
- The intent behind this commit is to add a new
compile time meson option to control the pldm verbosity.
- The value that is given for meson option goes into the
default systemd environment file which is picked by the
pldmd service unit before it starts.
- As the pldmd consumes the default pldmd file at runtime,
we should be able to alter the verbosity by changing the
content in /etc/default/pldm_verbosity file.
Tested By:
1. meson buildir
check the pldmd file (make sure verbosity is 0 by default)
2. meson builddir -Dverbosity=1
check the generated pldm_verbosity file (make sure verbosity is 1)
3. Flash the image & check if the pldm is loaded with the right verbosity
that is set during compilation.
4. Change the verbosity in the /etc/default/pldm_verbosity file & restart
pldmd.service, and check if the daemon picks up the change.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: Ica5607b801143b2806d343e3b82b043f078fcd22
diff --git a/meson.build b/meson.build
index aee4c5e..93c31cf 100644
--- a/meson.build
+++ b/meson.build
@@ -28,6 +28,7 @@
conf_data.set_quoted('FRU_JSONS_DIR', '/usr/share/pldm/fru')
conf_data.set_quoted('HOST_JSONS_DIR', '/usr/share/pldm/host')
conf_data.set_quoted('EVENTS_JSONS_DIR', '/usr/share/pldm/events')
+conf_data.set('PLDM_VERBOSITY',get_option('verbosity'))
if get_option('softoff').enabled()
conf_data.set('SOFTOFF_TIMEOUT_SECONDS', get_option('softoff-timeout-seconds'))
endif
@@ -109,6 +110,13 @@
output: 'pldmd.service',
)
+configure_file(
+ input: 'pldmd/verbosity/verbosity',
+ output: 'pldm_verbosity',
+ configuration: conf_data,
+ install: true,
+ install_dir: '/etc/default')
+
if get_option('oem-ibm').enabled()
subdir('oem/ibm/service_files')
endif