VirtualBox

Changeset 11046

Show
Ignore:
Timestamp:
07/31/08 22:09:59 (5 months ago)
Author:
vboxsync
Message:

Storage: Theoretically functional iSCSI backend.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/VBox/VBoxHDD-new.h

    r10715 r11046  
    3232#define ___VBox_VD_h 
    3333 
     34#include <iprt/assert.h> 
     35#include <iprt/string.h> 
     36#include <iprt/mem.h> 
    3437#include <VBox/cdefs.h> 
    3538#include <VBox/types.h> 
     39#include <VBox/err.h> 
     40/** @todo eliminate this dependency by moving data type definitions to the 
     41 * right place. PFNVMPROGRESS and P*PDMMEDIAGEOMETRY are affected. */ 
    3642#include <VBox/pdm.h> 
    3743 
     
    233239    /** Interface for progress notification. */ 
    234240    VDINTERFACETYPE_PROGRESS, 
     241    /** Interface for configuration information. */ 
     242    VDINTERFACETYPE_CONFIG, 
    235243    /** invalid interface. */ 
    236244    VDINTERFACETYPE_INVALID 
     
    267275 * Get a specific interface from a list of interfaces specified by the type. 
    268276 * 
    269  * @returns Pointer to the matching interface or NULL if none was found. 
     277 * @return Pointer to the matching interface or NULL if none was found. 
    270278 * @param   pInterfaces     Pointer to the first interface in the list. 
    271279 * @param   enmInterface    Interface to search for. 
     
    376384 * to inform the backend that a task finished. 
    377385 *  
    378  * @returns VBox status code. 
     386 * @return VBox status code. 
    379387 * @param   pvUser          Opaque user data which is passed on request submission. 
    380388 */ 
     
    402410     * Open callback 
    403411     * 
    404      * @returns VBox status code. 
     412     * @return VBox status code. 
    405413     * @param   pvUser          The opaque data passed on container creation. 
    406414     * @param   pszLocation     Name of the location to open. 
     
    413421     * Close callback. 
    414422     * 
    415      * @returns VBox status code. 
     423     * @return VBox status code. 
    416424     * @param   pvUser          The opaque data passed on container creation. 
    417425     * @param   pStorage        The opaque storage handle to close. 
     
    422430     * Synchronous write callback. 
    423431     * 
    424      * @returns VBox status code. 
     432     * @return VBox status code. 
    425433     * @param   pvUser          The opaque data passed on container creation. 
    426434     * @param   pStorage        The storage handle to use. 
     
    436444     * Synchronous read callback. 
    437445     * 
    438      * @returns VBox status code. 
     446     * @return VBox status code. 
    439447     * @param   pvUser          The opaque data passed on container creation. 
    440448     * @param   pStorage        The storage handle to use. 
     
    450458     * Flush data to the storage backend. 
    451459     * 
    452      * @returns VBox statis code. 
     460     * @return VBox statis code. 
    453461     * @param   pvUser          The opaque data passed on container creation. 
    454462     * @param   pStorage        The storage handle to flush. 
     
    459467     * Prepare an asynchronous read task. 
    460468     * 
    461      * @returns VBox status code. 
     469     * @return VBox status code. 
    462470     * @param   pvUser         The opqaue user data passed on container creation. 
    463471     * @param   pStorage       The storage handle. 
     
    473481     * Prepare an asynchronous write task. 
    474482     * 
    475      * @returns VBox status code. 
     483     * @return VBox status code. 
    476484     * @param   pvUser         The opaque user data passed on conatiner creation. 
    477485     * @param   pStorage       The storage handle. 
     
    487495     * Submit an array of tasks for processing 
    488496     * 
    489      * @returns VBox status code. 
     497     * @return VBox status code. 
    490498     * @param   pvUser        The opaque user data passed on container creation. 
    491499     * @param   apTasks       Array of task handles to submit. 
     
    552560    AssertMsgReturn(   (pInterfaceProgress->cbSize == sizeof(VDINTERFACEPROGRESS)) 
    553561                    && (pInterfaceProgress->enmInterface == VDINTERFACETYPE_PROGRESS), 
    554                     ("Not an progress notification interface\n"), NULL); 
     562                    ("Not a progress notification interface\n"), NULL); 
    555563 
    556564    return pInterfaceProgress; 
     565} 
     566 
     567/** Configuration node for configuration information interface. */ 
     568typedef struct VDCFGNODE *PVDCFGNODE; 
     569 
     570/** 
     571 * Configuration value type for configuration information interface. 
     572 */ 
     573typedef enum VDCFGVALUETYPE 
     574{ 
     575    /** Integer value. */ 
     576    VDCFGVALUETYPE_INTEGER = 1, 
     577    /** String value. */ 
     578    VDCDFVALUETYPE_STRING, 
     579    /** Bytestring value. */ 
     580    VDCFGVALUETYPE_BYTES 
     581} VDCFGVALUETYPE; 
     582/** Pointer to configuration value type for configuration information interface. */ 
     583typedef VDCFGVALUETYPE *PVDCFGVALUETYPE; 
     584 
     585/** 
     586 * Configuration information interface 
     587 */ 
     588typedef struct VDINTERFACECONFIG 
     589{ 
     590    /** 
     591     * Size of the configuration interface. 
     592     */ 
     593    uint32_t    cbSize; 
     594 
     595    /** 
     596     * Interface type. 
     597     */ 
     598    VDINTERFACETYPE enmInterface; 
     599 
     600    /** 
     601     * Validates that the values are within a set of valid names. 
     602     * 
     603     * @return  true if all names are found in pszzAllowed. 
     604     * @return  false if not. 
     605     * @param   pNode           The node which values should be examined. 
     606     * @param   pszzValid       List of valid names separated by '\\0' and ending with 
     607     *                          a double '\\0'. 
     608     */ 
     609    DECLR3CALLBACKMEMBER(bool, pfnAreValuesValid, (PVDCFGNODE pNode, const char *pszzValid)); 
     610    DECLR3CALLBACKMEMBER(int, pfnQueryType, (PVDCFGNODE pNode, const char *pszName, PVDCFGVALUETYPE penmType)); 
     611    DECLR3CALLBACKMEMBER(int, pfnQuerySize, (PVDCFGNODE pNode, const char *pszName, size_t *pcb)); 
     612    DECLR3CALLBACKMEMBER(int, pfnQueryInteger, (PVDCFGNODE pNode, const char *pszName, uint64_t *pu64)); 
     613    DECLR3CALLBACKMEMBER(int, pfnQueryIntegerDef, (PVDCFGNODE pNode, const char *pszName, uint64_t *pu64, uint64_t u64Def)); 
     614    DECLR3CALLBACKMEMBER(int, pfnQueryString, (PVDCFGNODE pNode, const char *pszName, char *pszString, size_t cchString)); 
     615    DECLR3CALLBACKMEMBER(int, pfnQueryStringDef, (PVDCFGNODE pNode, const char *pszName, char *pszString, size_t cchString, const char *pszDef)); 
     616    DECLR3CALLBACKMEMBER(int, pfnQueryBytes, (PVDCFGNODE pNode, const char *pszName, void *pvData, size_t cbData)); 
     617} VDINTERFACECONFIG, *PVDINTERFACECONFIG; 
     618 
     619/** 
     620 * Get configuration information interface from opaque callback table. 
     621 * 
     622 * @return Pointer to the callback table. 
     623 * @param  pCallbacks Opaque interface pointer. 
     624 */ 
     625DECLINLINE(PVDINTERFACECONFIG) VDGetInterfaceConfig(void *pCallbacks) 
     626{ 
     627    PVDINTERFACECONFIG pInterfaceConfig = (PVDINTERFACECONFIG)pCallbacks; 
     628 
     629    /* Do basic checks. */ 
     630    AssertMsgReturn(   (pInterfaceConfig->cbSize == sizeof(VDINTERFACECONFIG)) 
     631                    && (pInterfaceConfig->enmInterface == VDINTERFACETYPE_CONFIG), 
     632                    ("Not a configuration informaion interface\n"), NULL); 
     633 
     634    return pInterfaceConfig; 
     635} 
     636 
     637/** 
     638 * Query configuration, validates that the values are within a set of valid names. 
     639 * 
     640 * @returns true if all names are found in pszzAllowed. 
     641 * @returns false if not. 
     642 * @param   pCfgIf      Pointer to configuration callback table. 
     643 * @param   pNode       The node which values should be examined. 
     644 * @param   pszzValid   List of valid names separated by '\\0' and ending with 
     645 *                      a double '\\0'. 
     646 */ 
     647DECLINLINE(bool) VDCFGAreValuesValid(PVDINTERFACECONFIG pCfgIf, 
     648                                     PVDCFGNODE pNode, 
     649                                     const char *pszzValid) 
     650{ 
     651    return pCfgIf->pfnAreValuesValid(pNode, pszzValid); 
     652} 
     653 
     654/** 
     655 * Query configuration, unsigned 64-bit integer value with default. 
     656 *  
     657 * @return  VBox status code. 
     658 * @param   pCfgIf      Pointer to configuration callback table. 
     659 * @param   pNode       Which node to search for pszName in. 
     660 * @param   pszName     Name of an integer value 
     661 * @param   pu64        Where to store the value. Set to default on failure. 
     662 * @param   u64Def      The default value. 
     663 */ 
     664DECLINLINE(int) VDCFGQueryU64Def(PVDINTERFACECONFIG pCfgIf, PVDCFGNODE pNode, 
     665                                 const char *pszName, uint64_t *pu64, 
     666                                 uint64_t u64Def) 
     667{ 
     668    return pCfgIf->pfnQueryIntegerDef(pNode, pszName, pu64, u64Def); 
     669} 
     670 
     671/** 
     672 * Query configuration, unsigned 32-bit integer value with default. 
     673 *  
     674 * @return  VBox status code. 
     675 * @param   pCfgIf      Pointer to configuration callback table. 
     676 * @param   pNode       Which node to search for pszName in. 
     677 * @param   pszName     Name of an integer value 
     678 * @param   pu32        Where to store the value. Set to default on failure. 
     679 * @param   u32Def      The default value. 
     680 */ 
     681DECLINLINE(int) VDCFGQueryU32Def(PVDINTERFACECONFIG pCfgIf, PVDCFGNODE pNode, 
     682                                 const char *pszName, uint32_t *pu32, 
     683                                 uint32_t u32Def) 
     684{ 
     685    uint64_t u64; 
     686    int rc = pCfgIf->pfnQueryIntegerDef(pNode, pszName, &u64, u32Def); 
     687    if (VBOX_SUCCESS(rc)) 
     688    { 
     689        if (!(u64 & UINT64_C(0xffffffff00000000))) 
     690            *pu32 = (uint32_t)u64; 
     691        else 
     692            rc = VERR_CFGM_INTEGER_TOO_BIG; 
     693    } 
     694    return rc; 
     695} 
     696 
     697/** 
     698 * Query configuration, bool value with default. 
     699 *  
     700 * @return  VBox status code. 
     701 * @param   pCfgIf      Pointer to configuration callback table. 
     702 * @param   pNode       Which node to search for pszName in. 
     703 * @param   pszName     Name of an integer value 
     704 * @param   pf          Where to store the value. Set to default on failure. 
     705 * @param   fDef        The default value. 
     706 */ 
     707DECLINLINE(int) VDCFGQueryBoolDef(PVDINTERFACECONFIG pCfgIf, PVDCFGNODE pNode, 
     708                                  const char *pszName, bool *pf, 
     709                                  bool fDef) 
     710{ 
     711    uint64_t u64; 
     712    int rc = pCfgIf->pfnQueryIntegerDef(pNode, pszName, &u64, fDef); 
     713    if (VBOX_SUCCESS(rc)) 
     714        *pf = u64 ? true : false; 
     715    return rc; 
     716} 
     717 
     718/** 
     719 * Query configuration, dynamically allocated (RTMemAlloc) zero terminated 
     720 * character value. 
     721 *  
     722 * @return  VBox status code. 
     723 * @param   pCfgIf      Pointer to configuration callback table. 
     724 * @param   pNode       Which node to search for pszName in. 
     725 * @param   pszName     Name of an zero terminated character value 
     726 * @param   ppszString  Where to store the string pointer. Not set on failure. 
     727 *                      Free this using RTMemFree(). 
     728 */ 
     729DECLINLINE(int) VDCFGQueryStringAlloc(PVDINTERFACECONFIG pCfgIf, 
     730                                      PVDCFGNODE pNode, 
     731                                      const char *pszName, 
     732                                      char **ppszString) 
     733{ 
     734    size_t cch; 
     735    int rc = pCfgIf->pfnQuerySize(pNode, pszName, &cch); 
     736    if (VBOX_SUCCESS(rc)) 
     737    { 
     738        char *pszString = (char *)RTMemAlloc(cch); 
     739        if (pszString) 
     740        { 
     741            rc = pCfgIf->pfnQueryString(pNode, pszName, pszString, cch); 
     742            if (VBOX_SUCCESS(rc)) 
     743                *ppszString = pszString; 
     744            else 
     745                RTMemFree(pszString); 
     746        } 
     747        else 
     748            rc = VERR_NO_MEMORY; 
     749    } 
     750    return rc; 
     751} 
     752 
     753/** 
     754 * Query configuration, dynamically allocated (RTMemAlloc) zero terminated 
     755 * character value with default. 
     756 *  
     757 * @return  VBox status code. 
     758 * @param   pCfgIf      Pointer to configuration callback table. 
     759 * @param   pNode       Which node to search for pszName in. 
     760 * @param   pszName     Name of an zero terminated character value 
     761 * @param   ppszString  Where to store the string pointer. Not set on failure. 
     762 *                      Free this using RTMemFree(). 
     763 * @param   pszDef      The default value. 
     764 */ 
     765DECLINLINE(int) VDCFGQueryStringAllocDef(PVDINTERFACECONFIG pCfgIf, 
     766                                         PVDCFGNODE pNode, 
     767                                         const char *pszName, 
     768                                         char **ppszString, 
     769                                         const char *pszDef) 
     770{ 
     771    size_t cch; 
     772    int rc = pCfgIf->pfnQuerySize(pNode, pszName, &cch); 
     773    if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT) 
     774    { 
     775        cch = strlen(pszDef) + 1; 
     776        rc = VINF_SUCCESS; 
     777    } 
     778    if (VBOX_SUCCESS(rc)) 
     779    { 
     780        char *pszString = (char *)RTMemAlloc(cch); 
     781        if (pszString) 
     782        { 
     783            rc = pCfgIf->pfnQueryStringDef(pNode, pszName, pszString, cch, pszDef); 
     784            if (VBOX_SUCCESS(rc)) 
     785                *ppszString = pszString; 
     786            else 
     787                RTMemFree(pszString); 
     788        } 
     789        else 
     790            rc = VERR_NO_MEMORY; 
     791    } 
     792    return rc; 
     793} 
     794 
     795/** 
     796 * Query configuration, dynamically allocated (RTMemAlloc) byte string value. 
     797 *  
     798 * @return  VBox status code. 
     799 * @param   pCfgIf      Pointer to configuration callback table. 
     800 * @param   pNode       Which node to search for pszName in. 
     801 * @param   pszName     Name of an zero terminated character value 
     802 * @param   ppvData     Where to store the byte string pointer. Not set on failure. 
     803 *                      Free this using RTMemFree(). 
     804 * @param   pcbData     Where to store the byte string length. 
     805 */ 
     806DECLINLINE(int) VDCFGQueryBytesAlloc(PVDINTERFACECONFIG pCfgIf, 
     807                                     PVDCFGNODE pNode, const char *pszName, 
     808                                     void **ppvData, size_t *pcbData) 
     809{ 
     810    size_t cb; 
     811    int rc = pCfgIf->pfnQuerySize(pNode, pszName, &cb); 
     812    if (VBOX_SUCCESS(rc)) 
     813    { 
     814        char *pvData = (char *)RTMemAlloc(cb); 
     815        if (pvData) 
     816        { 
     817            rc = pCfgIf->pfnQueryBytes(pNode, pszName, pvData, cb); 
     818            if (VBOX_SUCCESS(rc)) 
     819            { 
     820                *ppvData = pvData; 
     821                *pcbData = cb; 
     822            } 
     823            else 
     824                RTMemFree(pvData); 
     825        } 
     826        else 
     827            rc = VERR_NO_MEMORY; 
     828    } 
     829    return rc; 
    557830} 
    558831 
     
    571844 * Free all returned names with RTStrFree() when you no longer need them. 
    572845 * 
    573  * @returns VBox status code. 
     846 * @return VBox status code. 
    574847 *          VERR_BUFFER_OVERFLOW if not enough space is passed. 
    575848 * @param   cEntriesAlloc   Number of list entries available. 
     
    584857 * Free all returned names with RTStrFree() when you no longer need them. 
    585858 * 
    586  * @returns VBox status code. 
     859 * @return VBox status code. 
    587860 * @param   pszBackend      The backend name. 
    588861 * @param   pEntries        Pointer to an entry. 
     
    594867 * No image files are opened. 
    595868 * 
    596  * @returns VBox status code. 
     869 * @return VBox status code. 
    597870 * @param   pInterfaces     Pointer to the first supported interface. 
    598871 * @param   ppDisk          Where to store the reference to HDD container. 
     
    611884 * Try to get the backend name which can use this image. 
    612885 * 
    613  * @returns VBox status code. 
     886 * @return VBox status code. 
    614887 * @param   pszFilename     Name of the image file for which the backend is queried. 
    615888 * @param   ppszFormat      Receives pointer of the UTF-8 string which contains the format name. 
     
    631904 * Use VDIsReadOnly to check open mode. 
    632905 * 
    633  * @returns VBox status code. 
     906 * @return VBox status code. 
    634907 * @param   pDisk           Pointer to HDD container. 
    635908 * @param   pszBackend      Name of the image file backend to use. 
     
    643916 * Creates and opens a new base image file. 
    644917 * 
    645  * @returns VBox status code. 
     918 * @return VBox status code. 
    646919 * @param   pDisk           Pointer to HDD container. 
    647920 * @param   pszBackend      Name of the image file backend to use. 
     
    670943 * See comments for VDOpen function about differencing images. 
    671944 * 
    672  * @returns VBox status code. 
     945 * @return VBox status code. 
    673946 * @param   pDisk           Pointer to HDD container. 
    674947 * @param   pszBackend      Name of the image file backend to use. 
     
    691964 * images in the HDD container. 
    692965 * 
    693  * @returns VBox status code. 
    694  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     966 * @return VBox status code. 
     967 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    695968 * @param   pDisk           Pointer to HDD container. 
    696969 * @param   nImageFrom      Name of the image file to merge from. 
     
    713986 * the image at the new location is opened in the same way as the old one was. 
    714987 * 
    715  * @returns VBox status code. 
    716  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     988 * @return VBox status code. 
     989 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    717990 * @param   pDiskFrom       Pointer to source HDD container. 
    718991 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    7361009 * will be reopened in read/write mode. 
    7371010 * 
    738  * @returns VBox status code. 
    739  * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 
     1011 * @return VBox status code. 
     1012 * @return VERR_VDI_NOT_OPENED if no image is opened in HDD container. 
    7401013 * @param   pDisk           Pointer to HDD container. 
    7411014 * @param   fDelete         If true, delete the image from the host disk. 
     
    7461019 * Closes all opened image files in HDD container. 
    7471020 * 
    748  * @returns VBox status code. 
     1021 * @return VBox status code. 
    7491022 * @param   pDisk           Pointer to HDD container. 
    7501023 */ 
     
    7541027 * Read data from virtual HDD. 
    7551028 * 
    756  * @returns VBox status code. 
    757  * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 
     1029 * @return VBox status code. 
     1030 * @return VERR_VDI_NOT_OPENED if no image is opened in HDD container. 
    7581031 * @param   pDisk           Pointer to HDD container. 
    7591032 * @param   uOffset         Offset of first reading byte from start of disk. 
     
    7661039 * Write data to virtual HDD. 
    7671040 * 
    768  * @returns VBox status code. 
    769  * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 
     1041 * @return VBox status code. 
     1042 * @return VERR_VDI_NOT_OPENED if no image is opened in HDD container. 
    7701043 * @param   pDisk           Pointer to HDD container. 
    7711044 * @param   uOffset         Offset of first writing byte from start of disk. 
     
    7781051 * Make sure the on disk representation of a virtual HDD is up to date. 
    7791052 * 
    780  * @returns VBox status code. 
    781  * @returns VERR_VDI_NOT_OPENED if no image is opened in HDD container. 
     1053 * @return VBox status code. 
     1054 * @return VERR_VDI_NOT_OPENED if no image is opened in HDD container. 
    7821055 * @param   pDisk           Pointer to HDD container. 
    7831056 */ 
     
    7871060 * Get number of opened images in HDD container. 
    7881061 * 
    789  * @returns Number of opened images for HDD container. 0 if no images have been opened. 
     1062 * @return Number of opened images for HDD container. 0 if no images have been opened. 
    7901063 * @param   pDisk           Pointer to HDD container. 
    7911064 */ 
     
    7951068 * Get read/write mode of HDD container. 
    7961069 * 
    797  * @returns Virtual disk ReadOnly status. 
    798  * @returns true if no image is opened in HDD container. 
     1070 * @return Virtual disk ReadOnly status. 
     1071 * @return true if no image is opened in HDD container. 
    7991072 * @param   pDisk           Pointer to HDD container. 
    8001073 */ 
     
    8041077 * Get total capacity of an image in HDD container. 
    8051078 * 
    806  * @returns Virtual disk size in bytes. 
    807  * @returns 0 if image with specified number was not opened. 
     1079 * @return Virtual disk size in bytes. 
     1080 * @return 0 if image with specified number was not opened. 
    8081081 * @param   pDisk           Pointer to HDD container. 
    8091082 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    8141087 * Get total file size of an image in HDD container. 
    8151088 * 
    816  * @returns Virtual disk size in bytes. 
    817  * @returns 0 if image with specified number was not opened. 
     1089 * @return Virtual disk size in bytes. 
     1090 * @return 0 if image with specified number was not opened. 
    8181091 * @param   pDisk           Pointer to HDD container. 
    8191092 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    8241097 * Get virtual disk PCHS geometry of an image in HDD container. 
    8251098 * 
    826  * @returns VBox status code. 
    827  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    828  * @returns VERR_VDI_GEOMETRY_NOT_SET if no geometry present in the HDD container. 
     1099 * @return VBox status code. 
     1100 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1101 * @return VERR_VDI_GEOMETRY_NOT_SET if no geometry present in the HDD container. 
    8291102 * @param   pDisk           Pointer to HDD container. 
    8301103 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    8371110 * Store virtual disk PCHS geometry of an image in HDD container. 
    8381111 * 
    839  * @returns VBox status code. 
    840  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1112 * @return VBox status code. 
     1113 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    8411114 * @param   pDisk           Pointer to HDD container. 
    8421115 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    8491122 * Get virtual disk LCHS geometry of an image in HDD container. 
    8501123 * 
    851  * @returns VBox status code. 
    852  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    853  * @returns VERR_VDI_GEOMETRY_NOT_SET if no geometry present in the HDD container. 
     1124 * @return VBox status code. 
     1125 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1126 * @return VERR_VDI_GEOMETRY_NOT_SET if no geometry present in the HDD container. 
    8541127 * @param   pDisk           Pointer to HDD container. 
    8551128 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    8621135 * Store virtual disk LCHS geometry of an image in HDD container. 
    8631136 * 
    864  * @returns VBox status code. 
    865  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1137 * @return VBox status code. 
     1138 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    8661139 * @param   pDisk           Pointer to HDD container. 
    8671140 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    8741147 * Get version of image in HDD container. 
    8751148 * 
    876  * @returns VBox status code. 
    877  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1149 * @return VBox status code. 
     1150 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    8781151 * @param   pDisk           Pointer to HDD container. 
    8791152 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    8861159 * Get type of image in HDD container. 
    8871160 * 
    888  * @returns VBox status code. 
    889  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1161 * @return VBox status code. 
     1162 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    8901163 * @param   pDisk           Pointer to HDD container. 
    8911164 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    8981171 * List the capabilities of image backend in HDD container. 
    8991172 * 
    900  * @returns VBox status code. 
    901  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1173 * @return VBox status code. 
     1174 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    9021175 * @param   pDisk           Pointer to the HDD container. 
    9031176 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    9101183 * Get flags of image in HDD container. 
    9111184 * 
    912  * @returns VBox status code. 
    913  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1185 * @return VBox status code. 
     1186 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    9141187 * @param   pDisk           Pointer to HDD container. 
    9151188 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    9211194 * Get open flags of image in HDD container. 
    9221195 * 
    923  * @returns VBox status code. 
    924  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1196 * @return VBox status code. 
     1197 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    9251198 * @param   pDisk           Pointer to HDD container. 
    9261199 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    9351208 * Note that in case of unrecoverable error all images in HDD container will be closed. 
    9361209 * 
    937  * @returns VBox status code. 
    938  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1210 * @return VBox status code. 
     1211 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    9391212 * @param   pDisk           Pointer to HDD container. 
    9401213 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    9491222 * purposes. 
    9501223 * 
    951  * @returns VBox status code. 
    952  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    953  * @returns VERR_BUFFER_OVERFLOW if pszFilename buffer too small to hold filename. 
     1224 * @return VBox status code. 
     1225 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1226 * @return VERR_BUFFER_OVERFLOW if pszFilename buffer too small to hold filename. 
    9541227 * @param   pDisk           Pointer to HDD container. 
    9551228 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    9631236 * Get the comment line of image in HDD container. 
    9641237 * 
    965  * @returns VBox status code. 
    966  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    967  * @returns VERR_BUFFER_OVERFLOW if pszComment buffer too small to hold comment text. 
     1238 * @return VBox status code. 
     1239 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1240 * @return VERR_BUFFER_OVERFLOW if pszComment buffer too small to hold comment text. 
    9681241 * @param   pDisk           Pointer to HDD container. 
    9691242 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    9771250 * Changes the comment line of image in HDD container. 
    9781251 * 
    979  * @returns VBox status code. 
    980  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1252 * @return VBox status code. 
     1253 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    9811254 * @param   pDisk           Pointer to HDD container. 
    9821255 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    9891262 * Get UUID of image in HDD container. 
    9901263 * 
    991  * @returns VBox status code. 
    992  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1264 * @return VBox status code. 
     1265 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    9931266 * @param   pDisk           Pointer to HDD container. 
    9941267 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    10001273 * Set the image's UUID. Should not be used by normal applications. 
    10011274 * 
    1002  * @returns VBox status code. 
    1003  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1275 * @return VBox status code. 
     1276 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    10041277 * @param   pDisk           Pointer to HDD container. 
    10051278 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    10111284 * Get last modification UUID of image in HDD container. 
    10121285 * 
    1013  * @returns VBox status code. 
    1014  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1286 * @return VBox status code. 
     1287 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    10151288 * @param   pDisk           Pointer to HDD container. 
    10161289 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    10231296 * Set the image's last modification UUID. Should not be used by normal applications. 
    10241297 * 
    1025  * @returns VBox status code. 
    1026  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1298 * @return VBox status code. 
     1299 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    10271300 * @param   pDisk           Pointer to HDD container. 
    10281301 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    10351308 * Get parent UUID of image in HDD container. 
    10361309 * 
    1037  * @returns VBox status code. 
    1038  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1310 * @return VBox status code. 
     1311 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    10391312 * @param   pDisk           Pointer to HDD container. 
    10401313 * @param   nImage          Image number, counts from 0. 0 is always base image of the container. 
     
    10471320 * Set the image's parent UUID. Should not be used by normal applications. 
    10481321 * 
    1049  * @returns VBox status code. 
     1322 * @return VBox status code. 
    10501323 * @param   pDisk           Pointer to HDD container. 
    10511324 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    10671340 * Query if asynchronous operations are supported for this disk. 
    10681341 * 
    1069  * @returns VBox status code. 
    1070  * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
     1342 * @return VBox status code. 
     1343 * @return VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 
    10711344 * @param   pDisk           Pointer to the HDD container. 
    10721345 * @param   nImage          Image number, counts from 0. 0 is always base image of container. 
     
    10791352 * Start a asynchronous read request. 
    10801353 * 
    1081  * @returns VBox status code. 
     1354 * @return VBox status code. 
    10821355 * @param   pDisk           Pointer to the HDD container. 
    10831356 * @param   uOffset         The offset of the virtual disk to read from. 
     
    10951368 * Start a asynchronous write request. 
    10961369 * 
    1097  * @returns VBox status code. 
     1370 * @return VBox status code. 
    10981371 * @param   pDisk           Pointer to the HDD container. 
    10991372 * @param   uOffset         The offset of the virtual disk to write to. 
  • trunk/include/VBox/err.h

    r10715 r11046  
    10491049/** Configuration value not found. */ 
    10501050#define VERR_VDI_VALUE_NOT_FOUND                    (-3216) 
     1051/** Configuration value is unknown. This indicates misconfiguration. */ 
     1052#define VERR_VDI_UNKNOWN_CFG_VALUES                 (-3217) 
    10511053/** Asynchronous I/O request finished. */ 
    10521054#define VINF_VDI_ASYNC_IO_FINISHED                  3218 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy