VirtualBox

Ignore:
Timestamp:
Jan 21, 2008 10:35:19 AM (17 years ago)
Author:
vboxsync
Message:

shared folders: store 'writable' attribute, do it backward compatible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r6388 r6400  
    787787const char *Console::sSSMConsoleUnit = "ConsoleData";
    788788//static
    789 uint32_t Console::sSSMConsoleVer = 0x00010000;
     789uint32_t Console::sSSMConsoleVer = 0x00010001;
    790790
    791791/**
     
    815815        uint32_t version = 0;
    816816        vrc = SSMR3Seek (ssm, sSSMConsoleUnit, 0 /* iInstance */, &version);
    817         if (version == sSSMConsoleVer)
     817        if (SSM_VERSION_MAJOR(version)  == SSM_VERSION_MAJOR(sSSMConsoleVer))
    818818        {
    819819            if (VBOX_SUCCESS (vrc))
     
    883883        AssertRC (vrc);
    884884
    885 //        XXX
    886 //        vrc = SSMR3PutBool (pSSM, folder->writable());
    887 //        AssertRC (vrc);
     885        vrc = SSMR3PutBool (pSSM, folder->writable());
     886        AssertRC (vrc);
    888887    }
    889888
     
    908907    LogFlowFunc (("\n"));
    909908
    910     if (u32Version != 0 && u32Version != sSSMConsoleVer)
     909    if (u32Version != 0 && SSM_VERSION_MAJOR_CHANGED(u32Version, sSSMConsoleVer))
    911910        return VERR_VERSION_MISMATCH;
    912911
     
    935934        Bstr name;
    936935        Bstr hostPath;
     936        bool writable = true;
    937937
    938938        uint32_t szBuf = 0;
     
    955955        delete[] buf;
    956956
     957        if (u32Version > 0x00010000)
     958            SSMR3GetBool (pSSM, &writable);
     959
    957960        ComObjPtr <SharedFolder> sharedFolder;
    958961        sharedFolder.createObject();
    959         HRESULT rc = sharedFolder->init (that, name, hostPath, true); /* TODO: fWritable */
     962        HRESULT rc = sharedFolder->init (that, name, hostPath, writable);
    960963        AssertComRCReturn (rc, VERR_INTERNAL_ERROR);
    961964
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