48 lines
1.7 KiB
Diff
48 lines
1.7 KiB
Diff
commit fa1638452b8299f1a7f8e9a94259b25218a92acc
|
|
Author: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
Date: Wed Jan 20 12:30:51 2021 +0530
|
|
|
|
sysvpd: Add UUID property
|
|
|
|
Recent LPARs contains "ibm,partition-uuid" device tree property.. which
|
|
is unique UUID for each LPAR. This is represented by `MU` keyword.
|
|
|
|
Lets add support to parse this property and populate vpddb.
|
|
|
|
Ideally we should enhance libvpd to support new keyword. But that will
|
|
add depedency on libvpd version. Hence adding this new keyword (MU)
|
|
as DeviceSpecific keyword.
|
|
|
|
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
|
|
diff --git a/src/internal/sys_interface/devicetreecollector.cpp b/src/internal/sys_interface/devicetreecollector.cpp
|
|
index 6afbe85..db4e8b5 100644
|
|
--- a/src/internal/sys_interface/devicetreecollector.cpp
|
|
+++ b/src/internal/sys_interface/devicetreecollector.cpp
|
|
@@ -1215,6 +1215,12 @@ ERROR:
|
|
sys->mSerialNum2.setValue( val, 80 , __FILE__, __LINE__ );
|
|
}
|
|
|
|
+ val = getAttrValue("/proc/device-tree", "ibm,partition-uuid" );
|
|
+ if( val != "" )
|
|
+ {
|
|
+ setVPDField( sys, string("MU"), val, __FILE__, __LINE__ );
|
|
+ }
|
|
+
|
|
getSystemVPD(sys);
|
|
}
|
|
|
|
diff --git a/src/internal/sys_interface/icollector.cpp b/src/internal/sys_interface/icollector.cpp
|
|
index ffa2466..5c4dccc 100644
|
|
--- a/src/internal/sys_interface/icollector.cpp
|
|
+++ b/src/internal/sys_interface/icollector.cpp
|
|
@@ -313,6 +313,8 @@ namespace lsvpd
|
|
else if( key == "SE" ) {
|
|
sys->mSerialNum1.setValue( val, 70, file, lineNum );
|
|
sys->mProcessorID.setValue( val, 70, file, lineNum );
|
|
+ } else if ( key == "MU" ) {
|
|
+ sys->addDeviceSpecific( key, "UUID", val, 90 );
|
|
} else
|
|
/* XXX: Un-recognized key */
|
|
sys->addDeviceSpecific( key, "System Specific", val, 90 );
|