VirtualBox

Ignore:
Timestamp:
Sep 15, 2010 6:25:32 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
65918
Message:

Storage/VBoxHDD: replace custom open flags with regular IPRT file open flags, introduce user-providable filesystem access interface, eliminate dependency on PGM geometry structure, change pvBuffer/cbBuffer parameter ordering to the usual conventions, eliminate the remains of the old I/O code, make more plugin methods optional to reduce redundancy, lots of cleanups

Storage/DrvVD+testcases,Main/Medium+Frontends: adapt to VBoxHDD changes, logging fixes

Storage/VDI+VMDK+DMG+Raw+VHD+Parallels+VCI: made as similar to each other as possible, added inline VFS wrappers to improve readability, full VFS support, VDI files are now 4K aligned, eliminate the remains of the old I/O code, various more or less severe bugfixes, code sort

Storage/iSCSI: support disks bigger than 2T, streamline the code to be more similar to the file-based backends, memory leak fix, error code usage like file-based backends, code sort

log+err: added new error codes/log groups and eliminated unused old ones

Location:
trunk/src/VBox/Devices/Storage/testcase
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/testcase/Makefile.kmk

    r32432 r32536  
    9696        $(VBOX_PATH_DEVICES_SRC)/Storage/ParallelsHDDCore.cpp \
    9797        $(VBOX_PATH_DEVICES_SRC)/Storage/DMGHDDCore.cpp
    98  ifdef VBOX_WITH_NEW_IO_CODE
    99  vbox-img_DEFS += VBOX_WITH_NEW_IO_CODE
    100  endif
    10198 vbox-img_DEFS += VBOX_HDD_NO_DYNAMIC_BACKENDS IN_VBOXDDU IN_VBOXDDU_STATIC IN_RT_R3
    10299endif
  • trunk/src/VBox/Devices/Storage/testcase/tstVD.cpp

    r29250 r32536  
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2010 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    5353}
    5454
    55 static int tstVDMessage(void *pvUser, const char *pszFormat, ...)
    56 {
    57     va_list va;
    58 
     55static int tstVDMessage(void *pvUser, const char *pszFormat, va_list va)
     56{
    5957    RTPrintf("tstVD: ");
    60     va_start(va, pszFormat);
    6158    RTPrintfV(pszFormat, va);
    62     va_end(va);
    6359    return VINF_SUCCESS;
    6460}
     
    6965    int rc;
    7066    PVBOXHDD pVD = NULL;
    71     PDMMEDIAGEOMETRY PCHS = { 0, 0, 0 };
    72     PDMMEDIAGEOMETRY LCHS = { 0, 0, 0 };
     67    VDGEOMETRY      PCHS = { 0, 0, 0 };
     68    VDGEOMETRY      LCHS = { 0, 0, 0 };
    7369    PVDINTERFACE     pVDIfs = NULL;
    7470    VDINTERFACE      VDIError;
     
    127123    int rc;
    128124    PVBOXHDD pVD = NULL;
    129     PDMMEDIAGEOMETRY PCHS = { 0, 0, 0 };
    130     PDMMEDIAGEOMETRY LCHS = { 0, 0, 0 };
     125    VDGEOMETRY      PCHS = { 0, 0, 0 };
     126    VDGEOMETRY      LCHS = { 0, 0, 0 };
    131127    PVDINTERFACE     pVDIfs = NULL;
    132128    VDINTERFACE      VDIError;
     
    509505    PVBOXHDD pVD = NULL;
    510506    char *pszFormat;
    511     PDMMEDIAGEOMETRY PCHS = { 0, 0, 0 };
    512     PDMMEDIAGEOMETRY LCHS = { 0, 0, 0 };
    513     uint64_t u64DiskSize  = 1000 * _1M;
     507    VDGEOMETRY PCHS = { 0, 0, 0 };
     508    VDGEOMETRY LCHS = { 0, 0, 0 };
     509    uint64_t u64DiskSize = 1000 * _1M;
    514510    uint32_t u32SectorSize = 512;
    515511    PVDINTERFACE     pVDIfs = NULL;
     
    551547    {
    552548        RTFileClose(File);
    553         rc = VDGetFormat(NULL, pszBaseFilename, &pszFormat);
     549        rc = VDGetFormat(NULL /* pVDIfsDisk */, NULL /* pVDIfsImage */,
     550                         pszBaseFilename, &pszFormat);
    554551        RTPrintf("VDGetFormat() pszFormat=%s rc=%Rrc\n", pszFormat, rc);
    555552        if (RT_SUCCESS(rc) && strcmp(pszFormat, pszBackend))
     
    633630    int rc;
    634631    PVBOXHDD pVD = NULL;
    635     PDMMEDIAGEOMETRY PCHS = { 0, 0, 0 };
    636     PDMMEDIAGEOMETRY LCHS = { 0, 0, 0 };
    637     uint64_t u64DiskSize  = 1000 * _1M;
     632    VDGEOMETRY PCHS = { 0, 0, 0 };
     633    VDGEOMETRY LCHS = { 0, 0, 0 };
     634    uint64_t u64DiskSize = 1000 * _1M;
    638635    uint32_t u32SectorSize = 512;
    639636    PVDINTERFACE     pVDIfs = NULL;
  • trunk/src/VBox/Devices/Storage/testcase/tstVDCopy.cpp

    r31493 r32536  
    9797    AssertRC(rc);
    9898
    99     rc = VDGetFormat(NULL, argv[1], &pszVD1);
     99    rc = VDGetFormat(NULL /* pVDIfsDisk */, NULL /* pVDIfsImage */,
     100                     argv[1], &pszVD1);
    100101    CHECK("VDGetFormat() hdd1");
    101102
    102     rc = VDGetFormat(NULL, argv[2], &pszVD2);
     103    rc = VDGetFormat(NULL /* pVDIfsDisk */, NULL /* pVDIfsImage */,
     104                     argv[2], &pszVD2);
    103105    CHECK("VDGetFormat() hdd2");
    104106
  • trunk/src/VBox/Devices/Storage/testcase/tstVDShareable.cpp

    r31193 r32536  
    5353}
    5454
    55 static int tstVDMessage(void *pvUser, const char *pszFormat, ...)
     55static int tstVDMessage(void *pvUser, const char *pszFormat, va_list va)
    5656{
    57     va_list va;
    58 
    5957    RTPrintf("tstVD: ");
    60     va_start(va, pszFormat);
    6158    RTPrintfV(pszFormat, va);
    62     va_end(va);
    6359    return VINF_SUCCESS;
    6460}
     
    6965    int rc;
    7066    PVBOXHDD pVD = NULL, pVD2 = NULL;
    71     PDMMEDIAGEOMETRY PCHS = { 0, 0, 0 };
    72     PDMMEDIAGEOMETRY LCHS = { 0, 0, 0 };
     67    VDGEOMETRY      PCHS = { 0, 0, 0 };
     68    VDGEOMETRY      LCHS = { 0, 0, 0 };
    7369    PVDINTERFACE     pVDIfs = NULL;
    7470    VDINTERFACE      VDIError;
  • trunk/src/VBox/Devices/Storage/testcase/tstVDSnap.cpp

    r28800 r32536  
    9292}
    9393
    94 static int tstVDMessage(void *pvUser, const char *pszFormat, ...)
    95 {
    96     va_list va;
    97 
     94static int tstVDMessage(void *pvUser, const char *pszFormat, va_list va)
     95{
    9896    RTPrintf("tstVD: ");
    99     va_start(va, pszFormat);
    10097    RTPrintfV(pszFormat, va);
    101     va_end(va);
    10298    return VINF_SUCCESS;
    10399}
     
    220216    int rc;
    221217    PVBOXHDD pVD = NULL;
    222     PDMMEDIAGEOMETRY PCHS = { 0, 0, 0 };
    223     PDMMEDIAGEOMETRY LCHS = { 0, 0, 0 };
     218    VDGEOMETRY      PCHS = { 0, 0, 0 };
     219    VDGEOMETRY      LCHS = { 0, 0, 0 };
    224220    PVDINTERFACE     pVDIfs = NULL;
    225221    VDINTERFACE      VDIError;
  • trunk/src/VBox/Devices/Storage/testcase/vbox-img.cpp

    r32431 r32536  
    7272}
    7373
    74 static int handleVDMessage(void *pvUser, const char *pszFormat, ...)
     74static int handleVDMessage(void *pvUser, const char *pszFormat, va_list va)
    7575{
    7676    NOREF(pvUser);
    77     va_list args;
    78     va_start(args, pszFormat);
    79     RTPrintfV(pszFormat, args);
    80     va_end(args);
     77    RTPrintfV(pszFormat, va);
    8178    return VINF_SUCCESS;
    8279}
     
    177174        /* Don't pass error interface, as that would triggers error messages
    178175         * because some backends fail to open the image. */
    179         rc = VDGetFormat(NULL, pszFilename, &pszFormat);
     176        rc = VDGetFormat(NULL, NULL, pszFilename, &pszFormat);
    180177        if (RT_FAILURE(rc))
    181178            return errorRuntime("Format autodetect failed: %Rrc\n", rc);
     
    246243    const char *pszDstFilename = NULL;
    247244    char *pszSrcFormat = NULL;
    248     char *pszDstFormat = NULL;
     245    const char *pszDstFormat = NULL;
    249246    const char *pszVariant = NULL;
    250247    PVBOXHDD pSrcDisk = NULL;
     
    338335        if (!pszSrcFormat)
    339336        {
    340             rc = VDGetFormat(NULL, pszSrcFilename, &pszSrcFormat);
     337            rc = VDGetFormat(NULL, NULL, pszSrcFilename, &pszSrcFormat);
    341338            if (RT_FAILURE(rc))
    342339            {
     
    431428    /* just try it */
    432429    char *pszFormat = NULL;
    433     rc = VDGetFormat(NULL, pszFilename, &pszFormat);
     430    rc = VDGetFormat(NULL, NULL, pszFilename, &pszFormat);
    434431    if (RT_FAILURE(rc))
    435432        return errorSyntax("Format autodetect failed: %Rrc\n", rc);
     
    487484    /* just try it */
    488485    char *pszFormat = NULL;
    489     rc = VDGetFormat(NULL, pszFilename, &pszFormat);
     486    rc = VDGetFormat(NULL, NULL, pszFilename, &pszFormat);
    490487    if (RT_FAILURE(rc))
    491488        return errorSyntax("Format autodetect failed: %Rrc\n", rc);
  • trunk/src/VBox/Devices/Storage/testcase/vditool.cpp

    r28855 r32536  
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2010 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    108108        return PrintDone(rc);
    109109
    110     PDMMEDIAGEOMETRY geo = { 0, 0, 0 }; /* auto-detect */
     110    VDGEOMETRY geo = { 0, 0, 0 }; /* auto-detect */
    111111    rc = VDCreateBase(hdd, "vdi", pszUtf8Filename,
    112112                      (uint64_t)cMBs * _1M,
     
    274274    if (RT_SUCCESS(rc))
    275275    {
    276         PDMMEDIAGEOMETRY LCHSGeometry = {0, 0, 0};
     276        VDGEOMETRY LCHSGeometry = {0, 0, 0};
    277277        rc = VDIDiskSetLCHSGeometry(pVdi, &LCHSGeometry);
    278278    }
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