FruDevice: improve updateFRUProperty function
updateFRUProperty function is used to write ASSET field but it
pretended to be generic.
This change fixes number of issues like
* wrong size check
* no control of data overflow
* erase FRU Area next to updated area
* wrong handle of first/last fields in area
and some other
This change also implements functionality to resize FRU Area, but it is
disabled by default.
Tested: Tested by setting all properties as writable ad then trying to
change them using "set-property" busctl call to FruDevice.
Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
Change-Id: Ic049bbf591878b4af344a352a2bec296e70cfb6e
diff --git a/src/meson.build b/src/meson.build
index fc85d9b..4966ed2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -18,11 +18,15 @@
)
if get_option('fru-device')
+ cpp_args_fd = cpp_args
+ if get_option('fru-device-resizefru')
+ cpp_args_fd = cpp_args_fd + ['-DENABLE_FRU_AREA_RESIZE']
+ endif
executable(
'fru-device',
'FruDevice.cpp',
'Utils.cpp',
- cpp_args: cpp_args,
+ cpp_args: cpp_args_fd,
dependencies: [
boost,
i2c,