VirtualBox

Changeset 33994 in vbox


Ignore:
Timestamp:
Nov 11, 2010 2:26:08 PM (14 years ago)
Author:
vboxsync
Message:

shfl: Replaced RTFSOBJINFO and RTFSPROPERTIES with shared folder specific versions. IPRT structures like this should never have been exposed to the guest.

Location:
trunk
Files:
13 edited

Legend:

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

    r33540 r33994  
    242242
    243243
     244/**
     245 * The available additional information in a SHFLFSOBJATTR object.
     246 */
     247typedef enum SHFLFSOBJATTRADD
     248{
     249    /** No additional information is available / requested. */
     250    SHFLFSOBJATTRADD_NOTHING = 1,
     251    /** The additional unix attributes (SHFLFSOBJATTR::u::Unix) are
     252     *  available / requested. */
     253    SHFLFSOBJATTRADD_UNIX,
     254    /** The additional extended attribute size (SHFLFSOBJATTR::u::EASize) is
     255     *  available / requested. */
     256    SHFLFSOBJATTRADD_EASIZE,
     257    /** The last valid item (inclusive).
     258     * The valid range is SHFLFSOBJATTRADD_NOTHING thru
     259     * SHFLFSOBJATTRADD_LAST. */
     260    SHFLFSOBJATTRADD_LAST = SHFLFSOBJATTRADD_EASIZE,
     261
     262    /** The usual 32-bit hack. */
     263    SHFLFSOBJATTRADD_32BIT_SIZE_HACK = 0x7fffffff
     264} SHFLFSOBJATTRADD;
     265
     266
     267/* Assert sizes of the IRPT types we're using below. */
     268AssertCompileSize(RTFMODE,      4);
     269AssertCompileSize(RTFOFF,       8);
     270AssertCompileSize(RTINODE,      8);
     271AssertCompileSize(RTTIMESPEC,   8);
     272AssertCompileSize(RTDEV,        4);
     273AssertCompileSize(RTUID,        4);
     274
     275/**
     276 * Shared folder filesystem object attributes.
     277 */
     278#pragma pack(1)
     279typedef struct SHFLFSOBJATTR
     280{
     281    /** Mode flags (st_mode). RTFS_UNIX_*, RTFS_TYPE_*, and RTFS_DOS_*.
     282     * @remarks We depend on a number of RTFS_ defines to remain unchanged.
     283     *          Fortuntately, these are depending on windows, dos and unix
     284     *          standard values, so this shouldn't be much of a pain. */
     285    RTFMODE         fMode;
     286
     287    /** The additional attributes available. */
     288    SHFLFSOBJATTRADD  enmAdditional;
     289
     290    /**
     291     * Additional attributes.
     292     *
     293     * Unless explicitly specified to an API, the API can provide additional
     294     * data as it is provided by the underlying OS.
     295     */
     296    union SHFLFSOBJATTRUNION
     297    {
     298        /** Additional Unix Attributes
     299         * These are available when SHFLFSOBJATTRADD is set in fUnix.
     300         */
     301         struct SHFLFSOBJATTRUNIX
     302         {
     303            /** The user owning the filesystem object (st_uid).
     304             * This field is ~0U if not supported. */
     305            RTUID           uid;
     306
     307            /** The group the filesystem object is assigned (st_gid).
     308             * This field is ~0U if not supported. */
     309            RTGID           gid;
     310
     311            /** Number of hard links to this filesystem object (st_nlink).
     312             * This field is 1 if the filesystem doesn't support hardlinking or
     313             * the information isn't available.
     314             */
     315            uint32_t        cHardlinks;
     316
     317            /** The device number of the device which this filesystem object resides on (st_dev).
     318             * This field is 0 if this information is not available. */
     319            RTDEV           INodeIdDevice;
     320
     321            /** The unique identifier (within the filesystem) of this filesystem object (st_ino).
     322             * Together with INodeIdDevice, this field can be used as a OS wide unique id
     323             * when both their values are not 0.
     324             * This field is 0 if the information is not available. */
     325            RTINODE         INodeId;
     326
     327            /** User flags (st_flags).
     328             * This field is 0 if this information is not available. */
     329            uint32_t        fFlags;
     330
     331            /** The current generation number (st_gen).
     332             * This field is 0 if this information is not available. */
     333            uint32_t        GenerationId;
     334
     335            /** The device number of a character or block device type object (st_rdev).
     336             * This field is 0 if the file isn't of a character or block device type and
     337             * when the OS doesn't subscribe to the major+minor device idenfication scheme. */
     338            RTDEV           Device;
     339        } Unix;
     340
     341        /**
     342         * Extended attribute size.
     343         */
     344        struct SHFLFSOBJATTREASIZE
     345        {
     346            /** Size of EAs. */
     347            RTFOFF          cb;
     348        } EASize;
     349    } u;
     350} SHFLFSOBJATTR;
     351#pragma pack()
     352AssertCompileSize(SHFLFSOBJATTR, 44);
     353/** Pointer to a shared folder filesystem object attributes structure. */
     354typedef SHFLFSOBJATTR *PSHFLFSOBJATTR;
     355/** Pointer to a const shared folder filesystem object attributes structure. */
     356typedef const SHFLFSOBJATTR *PCSHFLFSOBJATTR;
     357
     358
     359/**
     360 * Filesystem object information structure.
     361 */
     362#pragma pack(1)
     363typedef struct SHFLFSOBJINFO
     364{
     365   /** Logical size (st_size).
     366    * For normal files this is the size of the file.
     367    * For symbolic links, this is the length of the path name contained
     368    * in the symbolic link.
     369    * For other objects this fields needs to be specified.
     370    */
     371   RTFOFF       cbObject;
     372
     373   /** Disk allocation size (st_blocks * DEV_BSIZE). */
     374   RTFOFF       cbAllocated;
     375
     376   /** Time of last access (st_atime).
     377    * @remarks  Here (and other places) we depend on the IPRT timespec to
     378    *           remain unchanged. */
     379   RTTIMESPEC   AccessTime;
     380
     381   /** Time of last data modification (st_mtime). */
     382   RTTIMESPEC   ModificationTime;
     383
     384   /** Time of last status change (st_ctime).
     385    * If not available this is set to ModificationTime.
     386    */
     387   RTTIMESPEC   ChangeTime;
     388
     389   /** Time of file birth (st_birthtime).
     390    * If not available this is set to ChangeTime.
     391    */
     392   RTTIMESPEC   BirthTime;
     393
     394   /** Attributes. */
     395   SHFLFSOBJATTR Attr;
     396
     397} SHFLFSOBJINFO;
     398#pragma pack()
     399AssertCompileSize(SHFLFSOBJINFO, 92);
     400/** Pointer to a shared folder filesystem object information structure. */
     401typedef SHFLFSOBJINFO *PSHFLFSOBJINFO;
     402/** Pointer to a const shared folder filesystem object information
     403 *  structure. */
     404typedef const SHFLFSOBJINFO *PCSHFLFSOBJINFO;
     405
     406
     407/**
     408 * Copy file system objinfo from IPRT to shared folder format.
     409 *
     410 * @param   pDst                The shared folder structure.
     411 * @param   pSrc                The IPRT structure.
     412 */
     413DECLINLINE(void) vbfsCopyFsObjInfoFromIprt(PSHFLFSOBJINFO pDst, PCRTFSOBJINFO pSrc)
     414{
     415    pDst->cbObject          = pSrc->cbObject;
     416    pDst->cbAllocated       = pSrc->cbAllocated;
     417    pDst->AccessTime        = pSrc->AccessTime;
     418    pDst->ModificationTime  = pSrc->ModificationTime;
     419    pDst->ChangeTime        = pSrc->ChangeTime;
     420    pDst->BirthTime         = pSrc->BirthTime;
     421    pDst->Attr.fMode        = pSrc->Attr.fMode;
     422    RT_ZERO(pDst->Attr.u);
     423    switch (pSrc->Attr.enmAdditional)
     424    {
     425        default:
     426        case RTFSOBJATTRADD_NOTHING:
     427            pDst->Attr.enmAdditional        = SHFLFSOBJATTRADD_NOTHING;
     428            break;
     429
     430        case RTFSOBJATTRADD_UNIX:
     431            pDst->Attr.enmAdditional        = SHFLFSOBJATTRADD_UNIX;
     432            pDst->Attr.u.Unix.uid           = pSrc->Attr.u.Unix.uid;
     433            pDst->Attr.u.Unix.gid           = pSrc->Attr.u.Unix.gid;
     434            pDst->Attr.u.Unix.cHardlinks    = pSrc->Attr.u.Unix.cHardlinks;
     435            pDst->Attr.u.Unix.INodeIdDevice = pSrc->Attr.u.Unix.INodeIdDevice;
     436            pDst->Attr.u.Unix.INodeId       = pSrc->Attr.u.Unix.INodeId;
     437            pDst->Attr.u.Unix.fFlags        = pSrc->Attr.u.Unix.fFlags;
     438            pDst->Attr.u.Unix.GenerationId  = pSrc->Attr.u.Unix.GenerationId;
     439            pDst->Attr.u.Unix.Device        = pSrc->Attr.u.Unix.Device;
     440            break;
     441
     442        case RTFSOBJATTRADD_EASIZE:
     443            pDst->Attr.enmAdditional        = SHFLFSOBJATTRADD_EASIZE;
     444            pDst->Attr.u.EASize.cb          = pSrc->Attr.u.EASize.cb;
     445            break;
     446    }
     447}
     448
     449
    244450/** Result of an open/create request.
    245451 *  Along with handle value the result code
     
    361567     * returned actual attributes of opened/created object.
    362568     */
    363     RTFSOBJINFO Info;
     569    SHFLFSOBJINFO Info;
    364570
    365571} SHFLCREATEPARMS;
     
    397603{
    398604    /** Full information about the object. */
    399     RTFSOBJINFO     Info;
     605    SHFLFSOBJINFO   Info;
    400606    /** The length of the short field (number of RTUTF16 chars).
    401607     * It is 16-bit for reasons of alignment. */
     
    409615} SHFLDIRINFO, *PSHFLDIRINFO;
    410616
     617
     618/**
     619 * Shared folder filesystem properties.
     620 */
     621typedef struct SHFLFSPROPERTIES
     622{
     623    /** The maximum size of a filesystem object name.
     624     * This does not include the '\\0'. */
     625    uint32_t cbMaxComponent;
     626
     627    /** True if the filesystem is remote.
     628     * False if the filesystem is local. */
     629    bool    fRemote;
     630
     631    /** True if the filesystem is case sensitive.
     632     * False if the filesystem is case insensitive. */
     633    bool    fCaseSensitive;
     634
     635    /** True if the filesystem is mounted read only.
     636     * False if the filesystem is mounted read write. */
     637    bool    fReadOnly;
     638
     639    /** True if the filesystem can encode unicode object names.
     640     * False if it can't. */
     641    bool    fSupportsUnicode;
     642
     643    /** True if the filesystem is compresses.
     644     * False if it isn't or we don't know. */
     645    bool    fCompressed;
     646
     647    /** True if the filesystem compresses of individual files.
     648     * False if it doesn't or we don't know. */
     649    bool    fFileCompression;
     650
     651    /** @todo more? */
     652} SHFLFSPROPERTIES;
     653AssertCompileSize(SHFLFSPROPERTIES, 12);
     654/** Pointer to a shared folder filesystem properties structure. */
     655typedef SHFLFSPROPERTIES *PSHFLFSPROPERTIES;
     656/** Pointer to a const shared folder filesystem properties structure. */
     657typedef SHFLFSPROPERTIES const *PCSHFLFSPROPERTIES;
     658
     659
     660/**
     661 * Copy file system properties from IPRT to shared folder format.
     662 *
     663 * @param   pDst                The shared folder structure.
     664 * @param   pSrc                The IPRT structure.
     665 */
     666DECLINLINE(void) vbfsCopyFsPropertiesFromIprt(PSHFLFSPROPERTIES pDst, PCRTFSPROPERTIES pSrc)
     667{
     668    RT_ZERO(*pDst);                     /* zap the implicit padding. */
     669    pDst->cbMaxComponent   = pSrc->cbMaxComponent;
     670    pDst->fRemote          = pSrc->fRemote;
     671    pDst->fCaseSensitive   = pSrc->fCaseSensitive;
     672    pDst->fReadOnly        = pSrc->fReadOnly;
     673    pDst->fSupportsUnicode = pSrc->fSupportsUnicode;
     674    pDst->fCompressed      = pSrc->fCompressed;
     675    pDst->fFileCompression = pSrc->fFileCompression;
     676}
     677
     678
    411679typedef struct _SHFLVOLINFO
    412680{
     
    416684    uint32_t       ulBytesPerSector;
    417685    uint32_t       ulSerial;
    418     RTFSPROPERTIES fsProperties;
     686    SHFLFSPROPERTIES fsProperties;
    419687} SHFLVOLINFO, *PSHFLVOLINFO;
    420688
     
    9481216
    9491217    /** pointer, in/out:
    950      * Information to be set/get (RTFSOBJINFO or SHFLSTRING).
    951      * Do not forget to set the RTFSOBJINFO::Attr::enmAdditional for Get operation as well.
     1218     * Information to be set/get (SHFLFSOBJINFO or SHFLSTRING). Do not forget
     1219     * to set the SHFLFSOBJINFO::Attr::enmAdditional for Get operation as well.
    9521220     */
    9531221    HGCMFunctionParameter info;
  • trunk/src/VBox/Additions/WINNT/SharedFolders/redirector/sys/downlvli.c

    r31634 r33994  
    4848    VBoxMRxGetNetRootExtension(capFcb->pNetRoot, pNetRootExtension);
    4949    VBoxMRxGetDeviceExtension(RxContext, pDeviceExtension);
    50     PRTFSOBJINFO pObjInfo = 0;
     50    PSHFLFSOBJINFO pObjInfo = 0;
    5151    uint32_t cbBuffer;
    5252    int vboxRC;
     
    5454    Log(("VBOXSF: VBoxMRxSetEndOfFile: New size = %RX64 (0x%x), pNewAllocationSize = 0x%x\n", pNewFileSize->QuadPart, pNewFileSize, pNewAllocationSize));
    5555
    56     cbBuffer = sizeof(RTFSOBJINFO);
     56    cbBuffer = sizeof(SHFLFSOBJINFO);
    5757    pObjInfo = (PRTFSOBJINFO)vbsfAllocNonPagedMem(cbBuffer);
    5858    if (pObjInfo == 0)
     
    6565    pObjInfo->cbObject = pNewFileSize->QuadPart;
    6666    Assert(pVBoxFobx && pNetRootExtension && pDeviceExtension);
    67     vboxRC = vboxCallFSInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile, SHFL_INFO_SET | SHFL_INFO_SIZE, &cbBuffer, (PSHFLDIRINFO)pObjInfo);
     67    vboxRC = vboxCallFSInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile,
     68                            SHFL_INFO_SET | SHFL_INFO_SIZE, &cbBuffer, (PSHFLDIRINFO)pObjInfo);
    6869    AssertRC(vboxRC);
    6970
  • trunk/src/VBox/Additions/WINNT/SharedFolders/redirector/sys/fileinfo.c

    r33595 r33994  
    10101010    int vboxRC = 0;
    10111011    uint32_t cbHGCMBuffer, cbMaxSize = 0;
    1012     PRTFSOBJINFO pFileEntry = NULL;
     1012    PSHFLFSOBJINFO pFileEntry = NULL;
    10131013    PCHAR pInfoBuffer = NULL;
    10141014    ULONG *pLengthRemaining = NULL;
     
    12071207        }
    12081208
    1209         pFileEntry = (PRTFSOBJINFO)pHGCMBuffer;
     1209        pFileEntry = (PSHFLFSOBJINFO)pHGCMBuffer;
    12101210        Status = STATUS_SUCCESS;
    12111211
     
    14921492    {
    14931493        PFILE_BASIC_INFORMATION pFileInfo = (PFILE_BASIC_INFORMATION)pBuffer;
    1494         PRTFSOBJINFO pSHFLFileInfo;
     1494        PSHFLFSOBJINFO pSHFLFileInfo;
    14951495
    14961496        Log(("VBOXSF: VBoxMRxSetFileInformation: FileBasicInformation: CreationTime    %RX64\n", pFileInfo->CreationTime.QuadPart));
     
    15201520        }
    15211521
    1522         cbBuffer = sizeof(RTFSOBJINFO);
     1522        cbBuffer = sizeof(SHFLFSOBJINFO);
    15231523        pHGCMBuffer = (uint8_t *)vbsfAllocNonPagedMem(cbBuffer);
    15241524        if (pHGCMBuffer == 0)
     
    15281528        }
    15291529        RtlZeroMemory(pHGCMBuffer, cbBuffer);
    1530         pSHFLFileInfo = (PRTFSOBJINFO)pHGCMBuffer;
     1530        pSHFLFileInfo = (PSHFLFSOBJINFO)pHGCMBuffer;
    15311531
    15321532        Log(("VBOXSF: VBoxMRxSetFileInformation: FileBasicInformation: keeps %d %d %d %d\n",
    1533               pVBoxFobx->fKeepCreationTime, pVBoxFobx->fKeepLastAccessTime, pVBoxFobx->fKeepLastWriteTime, pVBoxFobx->fKeepChangeTime));
     1533             pVBoxFobx->fKeepCreationTime, pVBoxFobx->fKeepLastAccessTime, pVBoxFobx->fKeepLastWriteTime, pVBoxFobx->fKeepChangeTime));
    15341534
    15351535        /* The properties, that need to be changed, are set to something other than zero */
     
    15461546
    15471547        Assert(pVBoxFobx && pNetRootExtension && pDeviceExtension);
    1548         vboxRC = vboxCallFSInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile, SHFL_INFO_SET | SHFL_INFO_FILE, &cbBuffer, (PSHFLDIRINFO)pSHFLFileInfo);
     1548        vboxRC = vboxCallFSInfo(&pDeviceExtension->hgcmClient, &pNetRootExtension->map, pVBoxFobx->hFile,
     1549                                SHFL_INFO_SET | SHFL_INFO_FILE, &cbBuffer, (PSHFLDIRINFO)pSHFLFileInfo);
    15491550        AssertRC(vboxRC);
    15501551
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c

    r33439 r33994  
    714714}
    715715
    716 DECLVBGL(int) vboxCallSymlink (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING pNewPath, PSHFLSTRING pOldPath, PRTFSOBJINFO pBuffer)
     716DECLVBGL(int) vboxCallSymlink (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING pNewPath, PSHFLSTRING pOldPath,
     717                               PSHFLFSOBJINFO pBuffer)
    717718{
    718719    int rc = VINF_SUCCESS;
     
    734735
    735736    data.info.type                      = VMMDevHGCMParmType_LinAddr_Out;
    736     data.info.u.Pointer.size            = sizeof(RTFSOBJINFO);
     737    data.info.u.Pointer.size            = sizeof(SHFLFSOBJINFO);
    737738    data.info.u.Pointer.u.linearAddr    = (uintptr_t)pBuffer;
    738739
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.h

    r33540 r33994  
    2424 */
    2525
    26 #ifndef __VBOXCALLS__H
    27 #define __VBOXCALLS__H
     26#ifndef ___VBoxGuestLib_VBoxGuestR0LibSharedFolders_h
     27#define ___VBoxGuestLib_VBoxGuestR0LibSharedFolders_h
    2828
    2929#include <VBox/VBoxGuestLib.h>
     
    180180
    181181DECLVBGL(int) vboxReadLink (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING ParsedPath, uint32_t pcbBuffer, uint8_t *pBuffer);
    182 DECLVBGL(int) vboxCallSymlink (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING pNewPath, PSHFLSTRING pOldPath, PRTFSOBJINFO pBuffer);
     182DECLVBGL(int) vboxCallSymlink (PVBSFCLIENT pClient, PVBSFMAP pMap, PSHFLSTRING pNewPath, PSHFLSTRING pOldPath, PSHFLFSOBJINFO pBuffer);
    183183DECLVBGL(int) vboxCallSetSymlinks (PVBSFCLIENT pClient);
    184184
    185 #endif /* __VBOXCALLS__H */
     185#endif /* !___VBoxGuestLib_VBoxGuestR0LibSharedFolders_h */
     186
  • trunk/src/VBox/Additions/linux/sharedfolders/dirops.c

    r33540 r33994  
    319319    struct inode *inode;
    320320    ino_t ino;
    321     RTFSOBJINFO fsinfo;
     321    SHFLFSOBJINFO fsinfo;
    322322
    323323    TRACE();
     
    406406 */
    407407static int sf_instantiate(struct inode *parent, struct dentry *dentry,
    408                           SHFLSTRING *path, RTFSOBJINFO *info, SHFLHANDLE handle)
     408                          SHFLSTRING *path, PSHFLFSOBJINFO info, SHFLHANDLE handle)
    409409{
    410410    int err;
     
    747747    struct sf_glob_info *sf_g;
    748748    SHFLSTRING *path, *ssymname;
    749     RTFSOBJINFO info;
     749    SHFLFSOBJINFO info;
    750750    int symname_len = strlen(symname) + 1;
    751751
  • trunk/src/VBox/Additions/linux/sharedfolders/utils.c

    r33440 r33994  
    6969/* set [inode] attributes based on [info], uid/gid based on [sf_g] */
    7070void sf_init_inode(struct sf_glob_info *sf_g, struct inode *inode,
    71                    RTFSOBJINFO *info)
    72 {
    73     RTFSOBJATTR *attr;
     71                   PSHFLFSOBJINFO info)
     72{
     73    PSHFLFSOBJATTR attr;
    7474    int mode;
    7575
     
    150150
    151151int sf_stat(const char *caller, struct sf_glob_info *sf_g,
    152             SHFLSTRING *path, RTFSOBJINFO *result, int ok_to_fail)
     152            SHFLSTRING *path, PSHFLFSOBJINFO result, int ok_to_fail)
    153153{
    154154    int rc;
     
    198198    struct sf_glob_info *sf_g;
    199199    struct sf_inode_info *sf_i;
    200     RTFSOBJINFO info;
     200    SHFLFSOBJINFO info;
    201201
    202202    TRACE();
     
    275275    struct sf_inode_info *sf_i;
    276276    SHFLCREATEPARMS params;
    277     RTFSOBJINFO info;
     277    SHFLFSOBJINFO info;
    278278    uint32_t cbBuffer;
    279279    int rc, err;
     
    557557        {
    558558            int nb;
    559             wchar_t uni;
     559            wchar_t uni; /** @todo this should be unicode_t in more recent kernel versions. */
    560560
    561561#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c

    r33440 r33994  
    197197    struct sf_inode_info *sf_i;
    198198    struct sf_glob_info *sf_g;
    199     RTFSOBJINFO fsinfo;
     199    SHFLFSOBJINFO fsinfo;
    200200    struct vbsf_mount_info_new *info;
    201201
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h

    r33439 r33994  
    9797
    9898extern void sf_init_inode(struct sf_glob_info *sf_g, struct inode *inode,
    99                           RTFSOBJINFO *info);
     99                          PSHFLFSOBJINFO info);
    100100extern int  sf_stat(const char *caller, struct sf_glob_info *sf_g,
    101                     SHFLSTRING *path, RTFSOBJINFO *result, int ok_to_fail);
     101                    SHFLSTRING *path, PSHFLFSOBJINFO result, int ok_to_fail);
    102102extern int  sf_inode_revalidate(struct dentry *dentry);
    103103#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
  • trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs.h

    r31691 r33994  
    7373/** Helper functions */
    7474extern int vboxvfs_Stat(const char *pszCaller, vboxvfs_globinfo_t *pVBoxVFSGlobalInfo, SHFLSTRING *pPath,
    75             RTFSOBJINFO *pResult, boolean_t fAllowFailure);
     75            PSHFLFSOBJINFO pResult, boolean_t fAllowFailure);
    7676extern void vboxvfs_InitVNode(vboxvfs_globinfo_t *pVBoxVFSGlobalInfo, vboxvfs_vnode_t *pVBoxVNode,
    77             RTFSOBJINFO *pFSInfo);
     77            PSHFLFSOBJINFO pFSInfo);
    7878
    7979
  • trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.c

    r31691 r33994  
    416416
    417417static int
    418 sfprov_getinfo(sfp_mount_t *mnt, char *path, RTFSOBJINFO *info)
     418sfprov_getinfo(sfp_mount_t *mnt, char *path, PSHFLFSOBJINFO info)
    419419{
    420420        int rc;
     
    495495{
    496496        int rc;
    497         RTFSOBJINFO info;
     497        SHFLFSOBJINFO info;
    498498
    499499        rc = sfprov_getinfo(mnt, path, &info);
     
    508508{
    509509        int rc;
    510         RTFSOBJINFO info;
     510        SHFLFSOBJINFO info;
    511511
    512512        rc = sfprov_getinfo(mnt, path, &info);
     
    529529{
    530530        int rc;
    531         RTFSOBJINFO info;
     531        SHFLFSOBJINFO info;
    532532
    533533        rc = sfprov_getinfo(mnt, path, &info);
     
    542542{
    543543        int rc;
    544         RTFSOBJINFO info;
     544        SHFLFSOBJINFO info;
    545545
    546546        rc = sfprov_getinfo(mnt, path, &info);
     
    555555{
    556556        int rc;
    557         RTFSOBJINFO info;
     557        SHFLFSOBJINFO info;
    558558
    559559        rc = sfprov_getinfo(mnt, path, &info);
     
    575575{
    576576        int rc;
    577         RTFSOBJINFO info;
     577        SHFLFSOBJINFO info;
    578578
    579579        rc = sfprov_getinfo(mnt, path, &info);
     
    615615        SHFLCREATEPARMS parms;
    616616        SHFLSTRING *str;
    617         RTFSOBJINFO info;
     617        SHFLFSOBJINFO info;
    618618        uint32_t bytes;
    619619        int str_size;
     
    713713        SHFLCREATEPARMS parms;
    714714        SHFLSTRING *str;
    715         RTFSOBJINFO info;
     715        SHFLFSOBJINFO info;
    716716        uint32_t bytes;
    717717        int str_size;
  • trunk/src/VBox/HostServices/SharedFolders/testcase/tstShflSizes.cpp

    r33540 r33994  
    6060    STRUCT(SHFLDIRINFO, 128);
    6161    STRUCT(SHFLVOLINFO, 40);
     62    STRUCT(SHFLFSOBJATTR, 44);
     63    STRUCT(SHFLFSOBJINFO, 92);
    6264#ifdef VBOX_WITH_64_BITS_GUESTS
    6365/* The size of the guest structures depends on the current architecture bit count (ARCH_BITS)
  • trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp

    r33595 r33994  
    893893                info.Attr.fMode |= 0111;
    894894#endif
    895                 pParms->Info = info;
     895                vbfsCopyFsObjInfoFromIprt(&pParms->Info, &info);
    896896            }
    897897            pParms->Result = SHFL_FILE_EXISTS;
     
    969969            info.Attr.fMode |= 0111;
    970970#endif
    971             pParms->Info = info;
     971            vbfsCopyFsObjInfoFromIprt(&pParms->Info, &info);
    972972        }
    973973    }
     
    10661066                if (RT_SUCCESS(rc))
    10671067                {
    1068                     pParms->Info = info;
     1068                    vbfsCopyFsObjInfoFromIprt(&pParms->Info, &info);
    10691069                }
    10701070            }
     
    11711171            info.Attr.fMode |= 0111;
    11721172#endif
    1173             pParms->Info = info;
     1173            vbfsCopyFsObjInfoFromIprt(&pParms->Info, &info);
    11741174            pParms->Result = SHFL_FILE_EXISTS;
    11751175            break;
     
    15731573        pDirEntry->Info.Attr.fMode |= 0111;
    15741574#endif
    1575         pSFDEntry->Info = pDirEntry->Info;
     1575        vbfsCopyFsObjInfoFromIprt(&pSFDEntry->Info, &pDirEntry->Info);
    15761576        pSFDEntry->cucShortName = 0;
    15771577
     
    18911891            goto exit;
    18921892
    1893         rc = RTFsQueryProperties(pszFullPath, &pSFDEntry->fsProperties);
     1893        RTFSPROPERTIES FsProperties;
     1894        rc = RTFsQueryProperties(pszFullPath, &FsProperties);
    18941895        if (rc != VINF_SUCCESS)
    18951896            goto exit;
     1897        vbfsCopyFsPropertiesFromIprt(&pSFDEntry->fsProperties, &FsProperties);
    18961898
    18971899        *pcbBuffer = sizeof(SHFLVOLINFO);
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