[Arakhnę-Dev] [21] Bug fix: the new version of HAL does not store the serial number and the system UUID in the same properties as in its previous versions . |
[ Thread Index |
Date Index
| More arakhne.org/dev Archives
]
- To: dev@xxxxxxxxxxx
- Subject: [Arakhnę-Dev] [21] Bug fix: the new version of HAL does not store the serial number and the system UUID in the same properties as in its previous versions .
- From: subversion@xxxxxxxxxxxxx
- Date: Wed, 10 Dec 2008 14:29:40 +0100
Revision: 21
Author: galland
Date: 2008-12-10 14:29:39 +0100 (Wed, 10 Dec 2008)
Log Message:
-----------
Bug fix: the new version of HAL does not store the serial number and the system UUID in the same properties as in its previous versions. Support both of thems.
Modified Paths:
--------------
trunk/arakhneVmutils/native/josuuid/src/main/native/josuuid.cpp
Modified: trunk/arakhneVmutils/native/josuuid/src/main/native/josuuid.cpp
===================================================================
--- trunk/arakhneVmutils/native/josuuid/src/main/native/josuuid.cpp 2008-12-09 11:05:11 UTC (rev 20)
+++ trunk/arakhneVmutils/native/josuuid/src/main/native/josuuid.cpp 2008-12-10 13:29:39 UTC (rev 21)
@@ -122,8 +122,16 @@
}
return NULL;
#else
- char* result = runCommand("hal-get-property --udi /org/freedesktop/Hal/devices/computer --key smbios.system.serial");
- trim(&result);
+ char* result = runCommand("hal-get-property --udi /org/freedesktop/Hal/devices/computer --key system.hardware.serial");
+ if (result!=NULL) {
+ trim(&result);
+ }
+ else {
+ result = runCommand("hal-get-property --udi /org/freedesktop/Hal/devices/computer --key smbios.system.serial");
+ if (result!=NULL) {
+ trim(&result);
+ }
+ }
return result;
#endif
}
@@ -168,8 +176,16 @@
}
return NULL;
#else
- char* result = runCommand("hal-get-property --udi /org/freedesktop/Hal/devices/computer --key smbios.system.uuid");
- trim(&result);
+ char* result = runCommand("hal-get-property --udi /org/freedesktop/Hal/devices/computer --key system.hardware.uuid");
+ if (result!=NULL) {
+ trim(&result);
+ }
+ else {
+ result = runCommand("hal-get-property --udi /org/freedesktop/Hal/devices/computer --key smbios.system.uuid");
+ if (result!=NULL) {
+ trim(&result);
+ }
+ }
return result;
#endif
}