commit | 953fdc5ce056a8503261d2a5d93b6cb8d09d8b59 | [log] [tgz] |
---|---|---|
author | Kevin Tung <kevin.tung@quantatw.com> | Wed Aug 13 15:36:59 2025 +0800 |
committer | Kevin Tung <kevin.tung.openbmc@gmail.com> | Wed Aug 13 15:47:39 2025 +0800 |
tree | 47479b3618e652df7b5bf336a83275fa8f306111 | |
parent | f9cfdca9c11096d12b0a7bb8063823792ed9ad30 [diff] |
common: trim null bytes from filename in readNotifyAsync() readNotifyAsync() uses inotify_event to monitor filesystem changes. The name field in inotify_event contains a null-terminated name, and may include additional null bytes to pad the structure for alignment as mentioned in [1] inotify(7). If the padded name (including extra null bytes) is passed directly to processUpdate(), the comparison against the expected filename will fail, even when the visible parts of the names match. This change ensures the filename is trimmed at the first null byte before being passed to processUpdate(), preventing false mismatches and ensuring correct processing. Tested on Yosemite5, and confirmed that the BIOS version is retrieved correctly when host0_bios_version.txt is created. [1] https://www.man7.org/linux/man-pages/man7/inotify.7.html Change-Id: Ic0ccd7f4e163eb650baa65045c9af1e7be01964b Signed-off-by: Kevin Tung <kevin.tung.openbmc@gmail.com>
Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture
To build this package, do the following steps:
meson build
ninja -C build
To clean the repository run rm -r build
.