Changeset 4579 in vbox for trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp
- Timestamp:
- Sep 6, 2007 2:50:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp
r4526 r4579 428 428 } 429 429 430 static NTSTATUS VBoxGuestQueryMemoryBalloon(PVBOXGUESTDEVEXT pDevExt) 431 { 432 NTSTATUS Status = STATUS_SUCCESS; 433 430 static int VBoxGuestQueryMemoryBalloon(PVBOXGUESTDEVEXT pDevExt, ULONG *pMemBalloonSize) 431 { 434 432 /* just perform the request */ 435 433 VMMDevGetMemBalloonChangeRequest *req = NULL; … … 449 447 dprintf(("VBoxGuest::VBoxGuestDeviceControl IOCTL_VBOXGUEST_CTL_CHECK_BALLOON: error issuing request to VMMDev!" 450 448 "rc = %d, VMMDev rc = %Vrc\n", rc, req->header.rc)); 451 Status = STATUS_UNSUCCESSFUL;452 449 } 453 450 else … … 458 455 VbglGRFree(&req->header); 459 456 } 460 else 461 { 462 Status = STATUS_UNSUCCESSFUL; 463 } 464 return Status; 457 return rc; 465 458 } 466 459 … … 815 808 case IOCTL_VBOXGUEST_CTL_CHECK_BALLOON: 816 809 { 817 Status = VBoxGuestQueryMemoryBalloon(pDevExt); 810 ULONG *pMemBalloonSize = (ULONG *) pBuf; 811 812 if (pStack->Parameters.DeviceIoControl.OutputBufferLength != sizeof(ULONG)) 813 { 814 dprintf(("VBoxGuest::VBoxGuestDeviceControl: OutputBufferLength %d != sizeof(ULONG) %d\n", 815 pStack->Parameters.DeviceIoControl.OutputBufferLength, sizeof(ULONG))); 816 Status = STATUS_INVALID_PARAMETER; 817 break; 818 } 819 820 int rc = VBoxGuestQueryMemoryBalloon(pDevExt, pMemBalloonSize); 821 if (VBOX_FAILURE(rc)) 822 { 823 dprintf(("IOCTL_VBOXGUEST_CTL_CHECK_BALLOON: vbox rc = %Vrc\n", rc)); 824 Status = STATUS_UNSUCCESSFUL; 825 } 826 else 827 { 828 cbOut = pStack->Parameters.DeviceIoControl.OutputBufferLength; 829 } 818 830 break; 819 831 }
Note:
See TracChangeset
for help on using the changeset viewer.