VirtualBox

Ignore:
Timestamp:
Nov 12, 2018 8:06:57 PM (6 years ago)
Author:
vboxsync
Message:

VBoxSharedFolders,VBoxService,VBoxTray: New go at auto mounting shared folders, now also at runtime. bugref:3544

  • Added three new functions to the shared folders service:
    1. query mountpoint and everything else about a shared folder.
    2. wait for folder (mappings) config changes.
    3. cancel such waits.
  • Relaxed some of the check wrt placeholder folders so that the GUI can succesfully make changes to a folder while it is being used. The old code would end up failing if the guest was using the folder because of a (placeholder) duplicate.
  • Ran into some weird weird flag passing between service.cpp and vbsfMappingsQuery via pClient->fu32Flags. Didn't make sense to me and clashed with a new flag I added for the wait cancellation, so I changed it to use a parameter (fOnlyAutoMounts) for the purpose.
  • Pointed out that vbsfMappingsQuery is weird in a the way it doesn't return an overflow indicator, meaning that the guest library wrapper's checks for VINF_BUFFER_OVERFLOW is pointless.
  • In VBoxService I've reimplemented the automounter subservice. Only tested with a windows 7 guest so far. Highlights:
    • Use host specified mount points / drive letters.
    • Adjust to changes in mapping configuration.
    • Mappings should be global on windows guests, given that VBoxService runs under the System user (only verified on Win7).
  • One TODO is that I would like to try relocate a mapping that's not on the specified mount point once the mount point is freed up.
  • VBoxTray no longer maps shared folder on startup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp

    r74528 r75407  
    3131#include "VBoxVRDP.h"
    3232#include "VBoxHostVersion.h"
    33 #include "VBoxSharedFolders.h"
     33#ifdef VBOX_WITH_SHARED_FOLDERS
     34# include "VBoxSharedFolders.h"
     35#endif
    3436#ifdef VBOX_WITH_DRAG_AND_DROP
    3537# include "VBoxDnD.h"
     
    825827            if (RT_SUCCESS(rc))
    826828            {
     829#ifdef VBOX_WITH_SHARED_FOLDERS
    827830                /* Do the Shared Folders auto-mounting stuff. */
    828831                rc = VBoxSharedFoldersAutoMount();
     832#endif
    829833                if (RT_SUCCESS(rc))
    830834                {
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