Changeset 26182 in vbox
- Timestamp:
- Feb 3, 2010 4:59:44 AM (15 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmusb.h
r26172 r26182 678 678 #define PDM_USBINS_VERSION PDM_VERSION_MAKE(0xeefd, 1, 0) 679 679 680 /** 681 * Checks the structure versions of the USB device instance and USB device 682 * helpers, returning if they are incompatible. 683 * 684 * This is for use in the constructor. 685 * 686 * @param pUsbIns The USB device instance pointer. 687 */ 688 #define PDMUSB_CHECK_VERSIONS_RETURN(pUsbIns) \ 689 do \ 690 { \ 691 PPDMUSBINS pUsbInsTypeCheck = (pUsbIns); NOREF(pUsbInsTypeCheck); \ 692 AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->u32Version, PDM_USBINS_VERSION), \ 693 ("DevIns=%#x mine=%#x\n", (pUsbIns)->u32Version, PDM_USBINS_VERSION), \ 694 VERR_VERSION_MISMATCH); \ 695 AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->pHlpR3->u32Version, PDM_USBHLP_VERSION), \ 696 ("DevHlp=%#x mine=%#x\n", (pUsbIns)->pHlpR3->u32Version, PDM_USBHLP_VERSION), \ 697 VERR_VERSION_MISMATCH); \ 698 } while (0) 699 700 /** 701 * Quietly checks the structure versions of the USB device instance and 702 * USB device helpers, returning if they are incompatible. 703 * 704 * This is for use in the destructor. 705 * 706 * @param pUsbIns The USB device instance pointer. 707 */ 708 #define PDMUSB_CHECK_VERSIONS_RETURN_QUIET(pUsbIns) \ 709 do \ 710 { \ 711 PPDMUSBINS pUsbInsTypeCheck = (pUsbIns); NOREF(pUsbInsTypeCheck); \ 712 if (RT_UNLIKELY( !PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->u32Version, PDM_USBINS_VERSION) \ 713 || !PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->pHlpR3->u32Version, PDM_USBHLPR3_VERSION) )) \ 714 return VERR_VERSION_MISMATCH; \ 715 } while (0) 716 717 680 718 /** Converts a pointer to the PDMUSBINS::IBase to a pointer to PDMUSBINS. */ 681 719 #define PDMIBASE_2_PDMUSB(pInterface) ( (PPDMUSBINS)((char *)(pInterface) - RT_OFFSETOF(PDMUSBINS, IBase)) ) … … 796 834 } 797 835 836 /** 837 * @copydoc PDMUSBHLP::pfnMMHeapAlloc 838 */ 839 DECLINLINE(void *) PDMUsbHlpMMHeapAlloc(PPDMUSBINS pUsbIns, size_t cb) 840 { 841 return pUsbIns->pHlpR3->pfnMMHeapAlloc(pUsbIns, cb); 842 } 843 844 /** 845 * @copydoc PDMUSBHLP::pfnMMHeapAllocZ 846 */ 847 DECLINLINE(void *) PDMUsbHlpMMHeapAllocZ(PPDMUSBINS pUsbIns, size_t cb) 848 { 849 return pUsbIns->pHlpR3->pfnMMHeapAllocZ(pUsbIns, cb); 850 } 851 852 /** 853 * Frees memory allocated by PDMUsbHlpMMHeapAlloc or PDMUsbHlpMMHeapAllocZ. 854 * 855 * @param pUsbIns The USB device instance. 856 * @param pv The memory to free. NULL is fine. 857 */ 858 DECLINLINE(void) PDMUsbHlpMMHeapFree(PPDMUSBINS pUsbIns, void *pv) 859 { 860 NOREF(pUsbIns); 861 MMR3HeapFree(pv); 862 } 798 863 799 864 #endif /* IN_RING3 */ -
trunk/include/VBox/scsi.h
r23356 r26182 190 190 #define SCSI_ASC_MEDIUM_NOT_PRESENT 0x3a 191 191 #define SCSI_ASC_SAVING_PARAMETERS_NOT_SUPPORTED 0x39 192 #define SCSI_ASC_INVALID_MESSAGE 0x49 192 193 #define SCSI_ASC_MEDIA_LOAD_OR_EJECT_FAILED 0x53 193 194 #define SCSI_ASC_LOGICAL_UNIT_DOES_NOT_RESPOND_TO_SELECTION 0x00
Note:
See TracChangeset
for help on using the changeset viewer.