VirtualBox

Changeset 35810 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Feb 1, 2011 1:00:24 PM (14 years ago)
Author:
vboxsync
Message:

VMM: Replace most VERR_VERSION_MISMATCH by more specific error statuses. Translating the errors returned by device, driver and USB device constructors into specific ones for the benefit of old extension pack and misc use of the status.

Location:
trunk/include/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r35592 r35810  
    932932/** Reason for leaving RZ: Illegal call to ring-3. */
    933933#define VERR_VMM_RING3_CALL_DISABLED        (-2703)
     934/** The VMMR0.r0 module version does not match VBoxVMM.dll/so/dylib.
     935 * If you just upgraded VirtualBox, please make terminate all VMs and make sure
     936 * VBoxNetDHCP is not running.  Then try again.  If this error persists, try
     937 * re-installing VirtualBox. */
     938#define VERR_VMM_R0_VERSION_MISMATCH        (-2704)
     939/** The VMMRC.rc module version does not match VBoxVMM.dll/so/dylib.
     940 * Re-install if you are a user.  Developers should make sure the build is
     941 * complete or try with a clean build. */
     942#define VERR_VMM_RC_VERSION_MISMATCH        (-2705)
    934943/** @} */
    935944
     
    11301139/** Too many instances of a usb device. */
    11311140#define VERR_PDM_TOO_MANY_USB_DEVICE_INSTANCES      (-2869)
     1141/** Too many instances of a usb device. */
     1142#define VERR_PDM_TOO_MANY_USB_DEVICE_INSTANCES      (-2869)
     1143/** The device instance structure version has changed.
     1144 *
     1145 * If you have upgraded VirtualBox recently, please make sure you have
     1146 * terminated all VMs and upgraded any extension packs.  If this error
     1147 * persists, try re-install VirtualBox. */
     1148#define VERR_PDM_DEVINS_VERSION_MISMATCH            (-2870)
     1149/** The device helper structure version has changed.
     1150 *
     1151 * If you have upgraded VirtualBox recently, please make sure you have
     1152 * terminated all VMs and upgraded any extension packs.  If this error
     1153 * persists, try re-install VirtualBox. */
     1154#define VERR_PDM_DEVHLPR3_VERSION_MISMATCH          (-2871)
     1155/** The USB device instance structure version has changed.
     1156 *
     1157 * If you have upgraded VirtualBox recently, please make sure you have
     1158 * terminated all VMs and upgraded any extension packs.  If this error
     1159 * persists, try re-install VirtualBox. */
     1160#define VERR_PDM_USBINS_VERSION_MISMATCH            (-2872)
     1161/** The USB device helper structure version has changed.
     1162 *
     1163 * If you have upgraded VirtualBox recently, please make sure you have
     1164 * terminated all VMs and upgraded any extension packs.  If this error
     1165 * persists, try re-install VirtualBox. */
     1166#define VERR_PDM_USBHLPR3_VERSION_MISMATCH          (-2873)
     1167/** The driver instance structure version has changed.
     1168 *
     1169 * If you have upgraded VirtualBox recently, please make sure you have
     1170 * terminated all VMs and upgraded any extension packs.  If this error
     1171 * persists, try re-install VirtualBox. */
     1172#define VERR_PDM_DRVINS_VERSION_MISMATCH            (-2874)
     1173/** The driver helper structure version has changed.
     1174 *
     1175 * If you have upgraded VirtualBox recently, please make sure you have
     1176 * terminated all VMs and upgraded any extension packs.  If this error
     1177 * persists, try re-install VirtualBox. */
     1178#define VERR_PDM_DRVHLPR3_VERSION_MISMATCH          (-2875)
     1179/** Generic device structure version mismatch.
     1180 *
     1181 * If you have upgraded VirtualBox recently, please make sure you have
     1182 * terminated all VMs and upgraded any extension packs.  If this error
     1183 * persists, try re-install VirtualBox. */
     1184#define VERR_PDM_DEVICE_VERSION_MISMATCH            (-2876)
     1185/** Generic USB device structure version mismatch.
     1186 *
     1187 * If you have upgraded VirtualBox recently, please make sure you have
     1188 * terminated all VMs and upgraded any extension packs.  If this error
     1189 * persists, try re-install VirtualBox. */
     1190#define VERR_PDM_USBDEV_VERSION_MISMATCH            (-2877)
     1191/** Generic driver structure version mismatch.
     1192 *
     1193 * If you have upgraded VirtualBox recently, please make sure you have
     1194 * terminated all VMs and upgraded any extension packs.  If this error
     1195 * persists, try re-install VirtualBox. */
     1196#define VERR_PDM_DRIVER_VERSION_MISMATCH            (-2878)
    11321197/** @} */
    11331198
     
    16601725 * Returned by the VBOXEXTPACKREG::pfnInstalled. */
    16611726#define VERR_EXTPACK_UNSUPPORTED_HOST_UNINSTALL     (-6000)
     1727/** The VirtualBox version is not supported by one of the extension packs.
     1728 *
     1729 * You have probably upgraded VirtualBox recently.  Please upgrade the
     1730 * extension packs to versions compatible with this VirtualBox release.
     1731 */
     1732#define VERR_EXTPACK_VBOX_VERSION_MISMATCH          (-6001)
    16621733/** @} */
    16631734
  • trunk/include/VBox/vmm/pdmdev.h

    r35738 r35810  
    38523852        AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDevIns)->u32Version, PDM_DEVINS_VERSION), \
    38533853                              ("DevIns=%#x  mine=%#x\n", (pDevIns)->u32Version, PDM_DEVINS_VERSION), \
    3854                               VERR_VERSION_MISMATCH); \
     3854                              VERR_PDM_DEVINS_VERSION_MISMATCH); \
    38553855        AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDevIns)->pHlpR3->u32Version, PDM_DEVHLPR3_VERSION), \
    38563856                              ("DevHlp=%#x  mine=%#x\n", (pDevIns)->pHlpR3->u32Version, PDM_DEVHLPR3_VERSION), \
    3857                               VERR_VERSION_MISMATCH); \
     3857                              VERR_PDM_DEVHLPR3_VERSION_MISMATCH); \
    38583858    } while (0)
    38593859
     
    38703870    { \
    38713871        PPDMDEVINS pDevInsTypeCheck = (pDevIns); NOREF(pDevInsTypeCheck); \
    3872         if (RT_UNLIKELY(   !PDM_VERSION_ARE_COMPATIBLE((pDevIns)->u32Version, PDM_DEVINS_VERSION) \
    3873                         || !PDM_VERSION_ARE_COMPATIBLE((pDevIns)->pHlpR3->u32Version, PDM_DEVHLPR3_VERSION) )) \
    3874             return VERR_VERSION_MISMATCH; \
     3872        if (RT_UNLIKELY(!PDM_VERSION_ARE_COMPATIBLE((pDevIns)->u32Version, PDM_DEVINS_VERSION) )) \
     3873            return VERR_PDM_DEVINS_VERSION_MISMATCH; \
     3874        if (RT_UNLIKELY(!PDM_VERSION_ARE_COMPATIBLE((pDevIns)->pHlpR3->u32Version, PDM_DEVHLPR3_VERSION) )) \
     3875            return VERR_PDM_DEVHLPR3_VERSION_MISMATCH; \
    38753876    } while (0)
    38763877
  • trunk/include/VBox/vmm/pdmdrv.h

    r35676 r35810  
    338338/** SCSI driver. */
    339339#define PDM_DRVREG_CLASS_SCSI           RT_BIT(15)
    340 /** Generic raw PCI device driver. */ 
    341 #define PDM_DRVREG_CLASS_PCIRAW         RT_BIT(16) 
     340/** Generic raw PCI device driver. */
     341#define PDM_DRVREG_CLASS_PCIRAW         RT_BIT(16)
    342342/** @} */
    343343
     
    437437        AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->u32Version, PDM_DRVINS_VERSION), \
    438438                              ("DrvIns=%#x  mine=%#x\n", (pDrvIns)->u32Version, PDM_DRVINS_VERSION), \
    439                               VERR_VERSION_MISMATCH); \
     439                              VERR_PDM_DRVINS_VERSION_MISMATCH); \
    440440        AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->pHlpR3->u32Version, PDM_DRVHLPR3_VERSION), \
    441441                              ("DrvHlp=%#x  mine=%#x\n", (pDrvIns)->pHlpR3->u32Version, PDM_DRVHLPR3_VERSION), \
    442                               VERR_VERSION_MISMATCH); \
     442                              VERR_PDM_DRVHLPR3_VERSION_MISMATCH); \
    443443    } while (0)
    444444
  • trunk/include/VBox/vmm/pdmusb.h

    r35361 r35810  
    733733        AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->u32Version, PDM_USBINS_VERSION), \
    734734                              ("DevIns=%#x  mine=%#x\n", (pUsbIns)->u32Version, PDM_USBINS_VERSION), \
    735                               VERR_VERSION_MISMATCH); \
     735                              VERR_PDM_USBINS_VERSION_MISMATCH); \
    736736        AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->pHlpR3->u32Version, PDM_USBHLP_VERSION), \
    737737                              ("DevHlp=%#x  mine=%#x\n", (pUsbIns)->pHlpR3->u32Version, PDM_USBHLP_VERSION), \
    738                               VERR_VERSION_MISMATCH); \
     738                              VERR_PDM_USBHLPR3_VERSION_MISMATCH); \
    739739    } while (0)
    740740
     
    751751    { \
    752752        PPDMUSBINS pUsbInsTypeCheck = (pUsbIns); NOREF(pUsbInsTypeCheck); \
    753         if (RT_UNLIKELY(   !PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->u32Version, PDM_USBINS_VERSION) \
    754                         || !PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->pHlpR3->u32Version, PDM_USBHLPR3_VERSION) )) \
    755             return VERR_VERSION_MISMATCH; \
     753        if (RT_UNLIKELY(!PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->u32Version, PDM_USBINS_VERSION) )) \
     754            return VERR_PDM_USBINS_VERSION_MISMATCH; \
     755        if (RT_UNLIKELY(!PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->pHlpR3->u32Version, PDM_USBHLPR3_VERSION) )) \
     756            return VERR_PDM_USBHLPR3_VERSION_MISMATCH; \
    756757    } while (0)
    757758
  • trunk/include/VBox/vmm/vmapi.h

    r35361 r35810  
    365365VMMR3DECL(void)     VMR3SetErrorWorker(PVM pVM);
    366366VMMR3DECL(uint32_t) VMR3GetErrorCount(PVM pVM);
     367VMMR3DECL(uint32_t) VMR3GetErrorCountU(PUVM pUVM);
    367368VMMR3DECL(int)      VMR3AtRuntimeErrorRegister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
    368369VMMR3DECL(int)      VMR3AtRuntimeErrorDeregister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette