Revision: 15
http://svn.sourceforge.net/omc/?rev=15&view=rev
Author: jcarey
Date: 2006-11-01 16:56:40 -0800 (Wed, 01 Nov 2006)
Log Message:
-----------
Fixed command for getting RPM install date
Modified Paths:
--------------
cmpibase/trunk/src/providers/operating-system/LinuxOSInfo.c
Modified: cmpibase/trunk/src/providers/operating-system/LinuxOSInfo.c
===================================================================
--- cmpibase/trunk/src/providers/operating-system/LinuxOSInfo.c 2006-11-02 00:14:50 UTC (rev 14)
+++ cmpibase/trunk/src/providers/operating-system/LinuxOSInfo.c 2006-11-02 00:56:40 UTC (rev 15)
@@ -404,18 +404,19 @@
unsigned int outputSize;
const char* distName = omcLinuxOS_getName();
- const char *cmd[5];
+ const char *cmd[6];
cmd[0] = "/bin/rpm";
cmd[1] = "-q";
- cmd[2] = "--queryformat %{INSTALLTIME}";
- cmd[3] = NULL; /* Will point to rpm name */
- cmd[4] = NULL; /* NULL termination */
+ cmd[2] = "--queryformat";
+ cmd[3] = "%{INSTALLTIME}";
+ cmd[4] = NULL; /* Will point to rpm name */
+ cmd[5] = NULL; /* NULL termination */
/* First attempt to determine the installation date through RPM */
for (i =0; i < INSTALL_RPM_DATA_SIZE; i++) {
if (strstr(distName, install_rpm_data[i].distro)) {
- cmd[3] = install_rpm_data[i].file;
+ cmd[4] = install_rpm_data[i].file;
output = NULL;
if (omcExecuteProcessAndGatherOutputAndError((char* const*) cmd, NULL, &output,
&outputSize, -1, NULL, NULL, -1, NULL, &status, -1) == 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|