summaryrefslogtreecommitdiff
path: root/redfish-core/src/filesystem_log_watcher.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-02-11Remove the last memcpyEd Tanous1-2/+3
This is the last memcpy in bmcweb. Remove it in leui of std::bit_cast Tested: Need help. Change-Id: Ibd6fbc1a8fa9e80cd7e7edf356f8a45448c16189 Signed-off-by: Ed Tanous <etanous@nvidia.com>
2025-01-26Fix inotifyEd Tanous1-13/+24
We don't need the global variable here. Cleanup is handled by the stream_descriptor. Also check error codes per the documentation, not just on == -1 Tested: Created log file manually with redfish-event-listener enabled Saw log was sent to consumer. Change-Id: I27f13c7aedfdfe642128b7129f622047dd933380 Signed-off-by: Ed Tanous <etanous@nvidia.com>
2024-12-20Reformat for clang-19Ed Tanous1-2/+1
Change-Id: I6d677b16219482db16c64d5d8412ca557142a597 Signed-off-by: Ed Tanous <etanous@nvidia.com>
2024-11-27Break out Filesystem events into classesEd Tanous1-38/+102
EventServiceManager is already too large. Implement the TODO from run that these should be classes, and fix the issue where events are being registered on startup, not on a subscription being created. To accomplish this, this patch takes global state and breaks them out into RAII classes from EventServiceManager, one for monitoring DBus matches, and one for monitoring filesystem log events using inotify. Each of these connect to static methods on EventService that can send the relevant events to the user. Fundamentally, no code within the two new classes is changed, and the only changes to event service are made to support creation and destruction of the RAII classes. Tested: WIP No TelemetryService tests exist in Redfish. Change-Id: I74210a10002eb39fddc9e42b0690a7c3d42fbd4c Signed-off-by: Ed Tanous <etanous@nvidia.com>
2024-11-27Break out long lambda in filesystem eventsEd Tanous1-83/+80
This lambda is very large. Break it out into a smaller method. Tested: Last patch in series. Change-Id: Id80de2296fb6301fa26eba0c38bab3570bf82a35 Signed-off-by: Ed Tanous <etanous@nvidia.com>
2024-11-23Break out filesystem watcher into separate fileEd Tanous1-0/+181
EventServiceManager is very large. Break out two of the functions, and the global variables into a separate compile unit. Code is copied as-is, with no improvements made in this patch. Tested: At end of series. Change-Id: I89a3605885e5bafa86a6083f1ff8c5db3bb8daf9 Signed-off-by: Ed Tanous <etanous@nvidia.com>