Changeset 19070 in vbox
- Timestamp:
- Apr 21, 2009 12:29:36 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 46207
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r19068 r19070 417 417 RTPrintf("Memory available: %lu MByte\n", memoryAvailable); 418 418 419 #if 0 /* not yet implemented in Main */420 419 Bstr operatingSystem; 421 420 CHECK_ERROR (Host, COMGETTER(OperatingSystem)(operatingSystem.asOutParam())); … … 425 424 CHECK_ERROR (Host, COMGETTER(OSVersion)(oSVersion.asOutParam())); 426 425 RTPrintf("Operating system version: %lS\n", oSVersion.raw()); 427 #endif428 426 } 429 427 break; -
trunk/src/VBox/Main/HostImpl.cpp
r18704 r19070 110 110 #include <iprt/env.h> 111 111 #include <iprt/mem.h> 112 #include <iprt/system.h> 112 113 #ifdef RT_OS_SOLARIS 113 114 # include <iprt/path.h> … … 1152 1153 AutoWriteLock alock (this); 1153 1154 CHECK_READY(); 1154 /** @todo */ 1155 ReturnComNotImplemented(); 1155 1156 char szOSName[80]; 1157 int vrc = RTSystemQueryOSInfo(RTSYSOSINFO_PRODUCT, szOSName, sizeof(szOSName)); 1158 if (RT_FAILURE(vrc)) 1159 return E_FAIL; /** @todo error reporting? */ 1160 Bstr (szOSName).cloneTo (aOs); 1161 return S_OK; 1156 1162 } 1157 1163 … … 1167 1173 AutoWriteLock alock (this); 1168 1174 CHECK_READY(); 1169 /** @todo */ 1170 ReturnComNotImplemented(); 1175 1176 /* Get the OS release. Reserve some buffer space for the service pack. */ 1177 char szOSRelease[128]; 1178 int vrc = RTSystemQueryOSInfo(RTSYSOSINFO_RELEASE, szOSRelease, sizeof(szOSRelease) - 32); 1179 if (RT_FAILURE(vrc)) 1180 return E_FAIL; /** @todo error reporting? */ 1181 1182 /* Append the service pack if present. */ 1183 char szOSServicePack[80]; 1184 vrc = RTSystemQueryOSInfo(RTSYSOSINFO_SERVICE_PACK, szOSServicePack, sizeof(szOSServicePack)); 1185 if (RT_FAILURE(vrc)) 1186 { 1187 if (vrc != VERR_NOT_SUPPORTED) 1188 return E_FAIL; /** @todo error reporting? */ 1189 szOSServicePack[0] = '\0'; 1190 } 1191 if (szOSServicePack[0] != '\0') 1192 { 1193 char *psz = strchr(szOSRelease, '\0'); 1194 RTStrPrintf(psz, &szOSRelease[sizeof(szOSRelease)] - psz, "sp%s", szOSServicePack); 1195 } 1196 1197 Bstr (szOSRelease).cloneTo (aVersion); 1198 return S_OK; 1171 1199 } 1172 1200
Note:
See TracChangeset
for help on using the changeset viewer.