PEL: New D-Bus properties on PEL entry iface
Fill in the 4 newly added properties on the PEL entry D-Bus interface:
- Platform log ID (PLID)
- Deconfig flag from the SRC section
- Guard flag from the SRC section
- Creation timestamp
These were also added to the PELAttributes map in the Repository class
so that each PEL wouldn't have to be reconstructed from a file again
when creating the D-Bus objects.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7878645f56c634e6111fcecc22ab27673d0c0f5d
diff --git a/extensions/openpower-pels/repository.cpp b/extensions/openpower-pels/repository.cpp
index b19ce7a..fa2020c 100644
--- a/extensions/openpower-pels/repository.cpp
+++ b/extensions/openpower-pels/repository.cpp
@@ -115,14 +115,20 @@
}
}
- PELAttributes attributes{dirEntry.path(),
- getFileDiskSize(dirEntry.path()),
- pel.privateHeader().creatorID(),
- pel.userHeader().subsystem(),
- pel.userHeader().severity(),
- pel.userHeader().actionFlags(),
- pel.hostTransmissionState(),
- pel.hmcTransmissionState()};
+ PELAttributes attributes{
+ dirEntry.path(),
+ getFileDiskSize(dirEntry.path()),
+ pel.privateHeader().creatorID(),
+ pel.userHeader().subsystem(),
+ pel.userHeader().severity(),
+ pel.userHeader().actionFlags(),
+ pel.hostTransmissionState(),
+ pel.hmcTransmissionState(),
+ pel.plid(),
+ pel.getDeconfigFlag(),
+ pel.getGuardFlag(),
+ getMillisecondsSinceEpoch(
+ pel.privateHeader().createTimestamp())};
using pelID = LogID::Pel;
using obmcID = LogID::Obmc;
@@ -173,14 +179,19 @@
write(*(pel.get()), path);
- PELAttributes attributes{path,
- getFileDiskSize(path),
- pel->privateHeader().creatorID(),
- pel->userHeader().subsystem(),
- pel->userHeader().severity(),
- pel->userHeader().actionFlags(),
- pel->hostTransmissionState(),
- pel->hmcTransmissionState()};
+ PELAttributes attributes{
+ path,
+ getFileDiskSize(path),
+ pel->privateHeader().creatorID(),
+ pel->userHeader().subsystem(),
+ pel->userHeader().severity(),
+ pel->userHeader().actionFlags(),
+ pel->hostTransmissionState(),
+ pel->hmcTransmissionState(),
+ pel->plid(),
+ pel->getDeconfigFlag(),
+ pel->getGuardFlag(),
+ getMillisecondsSinceEpoch(pel->privateHeader().createTimestamp())};
using pelID = LogID::Pel;
using obmcID = LogID::Obmc;