Changeset 70066 in vbox
- Timestamp:
- Dec 11, 2017 4:33:05 PM (7 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxGuest
- Files:
-
- 9 edited
-
VBoxGuest-darwin.cpp (modified) (1 diff)
-
VBoxGuest-freebsd.c (modified) (2 diffs)
-
VBoxGuest-haiku.c (modified) (1 diff)
-
VBoxGuest-linux.c (modified) (1 diff)
-
VBoxGuest-netbsd.c (modified) (1 diff)
-
VBoxGuest-os2.cpp (modified) (1 diff)
-
VBoxGuest-solaris.c (modified) (1 diff)
-
VBoxGuest-win.cpp (modified) (2 diffs)
-
VBoxGuest.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.cpp
r69500 r70066 667 667 { 668 668 NOREF(pDevExt); 669 } 670 671 672 bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue) 673 { 674 RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue); 675 return false; 669 676 } 670 677 -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c
r69500 r70066 563 563 } 564 564 565 565 566 /** 566 567 * Interrupt service routine. … … 587 588 selwakeup(&g_SelInfo); 588 589 } 590 591 592 bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue) 593 { 594 RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue); 595 return false; 596 } 597 589 598 590 599 /** -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.c
r69500 r70066 354 354 355 355 356 bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue) 357 { 358 RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue); 359 return false; 360 } 361 362 356 363 /** 357 364 * Sets IRQ for VMMDev. -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
r70033 r70066 1058 1058 1059 1059 1060 bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue) 1061 { 1062 RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue); 1063 return false; 1064 } 1065 1066 1060 1067 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) 1061 1068 -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-netbsd.c
r70065 r70066 530 530 531 531 532 bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue) 533 { 534 RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue); 535 return false; 536 } 537 538 532 539 static int VBoxGuestNetBSDSetMouseStatus(vboxguest_softc *sc, uint32_t fStatus) 533 540 { -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.cpp
r69500 r70066 605 605 606 606 607 bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue) 608 { 609 RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue); 610 return false; 611 } 612 613 607 614 #ifdef DEBUG_READ /** @todo figure out this one once and for all... */ 608 615 -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
r69500 r70066 1083 1083 1084 1084 1085 bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue) 1086 { 1087 RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue); 1088 return false; 1089 } 1090 1091 1085 1092 /** 1086 1093 * Sets the mouse notification callback. -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
r70041 r70066 1085 1085 1086 1086 /** 1087 * Hook for handling OS specfic options from the host. 1088 * 1089 * @returns true if handled, false if not. 1090 * @param pDevExt The device extension. 1091 * @param pszName The option name. 1092 * @param pszValue The option value. 1093 */ 1094 bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue) 1095 { 1096 RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue); 1097 return false; 1098 } 1099 1100 1101 1102 /** 1087 1103 * Queries (gets) a DWORD value from the registry. 1088 1104 * … … 1138 1154 } 1139 1155 1140 #if 0 /* test me */1141 1156 /* 1142 1157 * Read configuration from the host. 1143 1158 */ 1159 LogRelFunc(("Calling VGDrvCommonProcessOptionsFromHost...\n")); 1144 1160 VGDrvCommonProcessOptionsFromHost(&pDevExt->Core); 1145 #endif 1161 LogRelFunc(("VGDrvCommonProcessOptionsFromHost returned\n")); 1146 1162 } 1147 1163 -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r70058 r70066 55 55 #include <VBox/VMMDev.h> /* for VMMDEV_RAM_SIZE */ 56 56 #include <VBox/log.h> 57 #if !defined(RT_OS_LINUX) && !defined(RT_OS_FREEBSD) 58 # include <VBox/HostServices/GuestPropertySvc.h> 59 #endif 57 60 #include <iprt/ctype.h> 58 61 #include <iprt/mem.h> … … 1136 1139 } 1137 1140 1138 #if 0 /* needs testing */ 1139 1140 #include <VBox/HostServices/GuestPropertySvc.h> 1141 1142 /** 1143 * Checks if the given option can be taken to no mean 'false'. 1141 1142 /** 1143 * Checks if the given option can be taken to not mean 'false'. 1144 1144 * 1145 1145 * @returns true or false accordingly. … … 1159 1159 && ch != 'N' /* NO */ 1160 1160 && ch != 'd' /* disabled */ 1161 && ch != 'f' /* false*/ 1162 && ch != 'F' /* FALSE */ 1161 1163 && ch != 'D' /* DISABLED */ 1162 1164 && ( (ch != 'o' && ch != 'O') /* off, OFF, Off */ … … 1170 1172 1171 1173 /** 1172 * Hook for handling OS specfic options from the host.1173 *1174 * @returns true if handled, false if not.1175 * @param pDevExt The device extension.1176 * @param pszName The option name.1177 * @param pszValue The option value.1178 */1179 bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue)1180 {1181 RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue);1182 return false;1183 }1184 1185 /**1186 1174 * Processes a option. 1187 1175 * … … 1211 1199 void VGDrvCommonProcessOptionsFromHost(PVBOXGUESTDEVEXT pDevExt) 1212 1200 { 1201 #if !defined(RT_OS_LINUX) && !defined(RT_OS_FREEBSD) 1213 1202 /* 1214 1203 * Create a kernel session without our selves, then connect to the HGCM service. … … 1222 1211 VBGLIOCHGCMCONNECT Connect; 1223 1212 VBGLIOCHGCMDISCONNECT Disconnect; 1224 guestProp::EnumPropertiesEnumMsg;1213 GuestPropMsgEnumProperties EnumMsg; 1225 1214 } uBuf; 1226 1215 … … 1239 1228 1240 1229 /* 1241 * Enumerate all the relevant properties. We try with a 2KB buffer, but1242 * will double it until we get what we want or go beyond 64KB.1230 * Enumerate all the relevant properties. We try with a 1KB buffer, but 1231 * will double it until we get what we want or go beyond 16KB. 1243 1232 */ 1244 for (cbStrings = _ 2K; cbStrings <= _64K; cbStrings *= 2)1233 for (cbStrings = _1K; cbStrings <= _16K; cbStrings *= 2) 1245 1234 { 1246 1235 pszzStrings = (char *)RTMemAllocZ(cbStrings); 1247 1236 if (pszzStrings) 1248 1237 { 1249 VBGL_HGCM_HDR_INIT(&uBuf.EnumMsg.hdr, idClient, guestProp::ENUM_PROPS, 3);1238 VBGL_HGCM_HDR_INIT(&uBuf.EnumMsg.hdr, idClient, GUEST_PROP_FN_ENUM_PROPS, 3); 1250 1239 1251 1240 uBuf.EnumMsg.patterns.type = VMMDevHGCMParmType_LinAddr; … … 1263 1252 &uBuf.EnumMsg.hdr.Hdr, sizeof(uBuf.EnumMsg)); 1264 1253 if (RT_SUCCESS(rc)) 1254 { 1255 if ( uBuf.EnumMsg.size.type == VMMDevHGCMParmType_32bit 1256 && uBuf.EnumMsg.size.u.value32 <= cbStrings 1257 && uBuf.EnumMsg.size.u.value32 > 0) 1258 cbStrings = uBuf.EnumMsg.size.u.value32; 1259 Log(("VGDrvCommonReadConfigurationFromHost: GUEST_PROP_FN_ENUM_PROPS -> %#x bytes (cbStrings=%#x)\n", 1260 uBuf.EnumMsg.size.u.value32, cbStrings)); 1265 1261 break; 1262 } 1266 1263 1267 1264 RTMemFree(pszzStrings); … … 1313 1310 if (!ch) 1314 1311 break; 1312 if (fValidFields) 1313 Log(("VGDrvCommonReadConfigurationFromHost: Invalid char %#x at %#x (field %u)\n", 1314 ch, off - 1, iField)); 1315 1315 fValidFields = false; 1316 1316 } 1317 1317 } 1318 1318 } 1319 if ( off < cbStrings1319 if ( off <= cbStrings 1320 1320 && fValidFields 1321 1321 && *apszFields[0] != '\0') … … 1342 1342 { 1343 1343 LogRel(("VBoxGuest: Malformed guest properties enum result!\n")); 1344 Log(("VBoxGuest: off=%#x cbStrings=%#x\n%.*Rhxd\n", off, cbStrings, cbStrings, pszzStrings)); 1344 1345 break; 1345 1346 } 1346 else if ( fValidFields)1347 else if (!fValidFields) 1347 1348 LogRel(("VBoxGuest: Ignoring %.*Rhxs as it has invalid characters in one or more fields\n", 1348 1349 (int)strlen(apszFields[0]), apszFields[0])); … … 1362 1363 else 1363 1364 LogRel(("VGDrvCommonReadConfigurationFromHost: failed to connect: %Rrc\n", rc)); 1364 } 1365 1366 #endif /* needs testing */ 1365 1366 #else /* RT_OS_LINUX || RT_OS_FREEBSD */ 1367 RT_NOREF(pDevExt); 1368 #endif 1369 } 1370 1367 1371 1368 1372 /**
Note:
See TracChangeset
for help on using the changeset viewer.

