VirtualBox

Changeset 98824 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Mar 2, 2023 5:06:36 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156144
Message:

Guest Control: Made the directory entry reading really dynamic by letting the guest tell us the size it reports to the guest (limited by GSTCTL_DIRENTRY_MAX_SIZE). Re-introduced the #pragma pack(1) because we need the structures on mixed bitness (32 / 64 or vice versa) with the same size. bugref:9783

Location:
trunk/include/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/GuestHost/GuestControl.h

    r98820 r98824  
    303303 * Additional Unix Attributes (GSTCTLFSOBJATTRADD_UNIX).
    304304 */
     305#pragma pack(1)
    305306typedef struct GSTCTLFSOBJATTRUNIX
    306307{
     
    344345    RTDEV           Device;
    345346} GSTCTLFSOBJATTRUNIX;
     347#pragma pack()
     348AssertCompileSize(GSTCTLFSOBJATTRUNIX, 36);
    346349
    347350/**
     
    549552typedef GSTCTLDIRENTRYEX const *PCGSTCTLDIRENTRYEX;
    550553
    551 /** The maximum size (in bytes) of a GSTCTLDIRENTRYEX (includes dynamic szName[pDirEntry->cbName + 1]). */
    552 #define GSTCTL_DIRENTRY_MAX_SIZE    (sizeof(GSTCTLDIRENTRYEX) + RTPATH_MAX)
     554/** The maximum size (in bytes) of an entry file name (at least RT_UOFFSETOF(GSTCTLDIRENTRYEX, szName[2]). */
     555#define GSTCTL_DIRENTRY_MAX_SIZE    4096
    553556
    554557} /* namespace guestControl */
  • trunk/include/VBox/HostServices/GuestControlSvc.h

    r98823 r98824  
    10631063    /** Handle of directory listing to read the next entry for. */
    10641064    HGCMFunctionParameter handle;
    1065     /** Maximum directory entry size (in bytes) to use.
    1066      *  @sa GSTCTL_DIRENTRY_MAX_SIZE */
    1067     HGCMFunctionParameter max_entry_size;
    10681065} HGCMMsgDirRead;
    10691066
  • trunk/include/VBox/VBoxGuestLib.h

    r98818 r98824  
    11201120VBGLR3DECL(int) VbglR3GuestCtrlDirGetOpen(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszPath, uint32_t cbPath, uint32_t *pfFlags, GSTCTLDIRFILTER *penmFilter, GSTCTLFSOBJATTRADD *penmReadAttrAdd, uint32_t *pfReadFlags);
    11211121VBGLR3DECL(int) VbglR3GuestCtrlDirGetClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle);
    1122 VBGLR3DECL(int) VbglR3GuestCtrlDirGetRead(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, uint32_t *pcbDirEntry);
     1122VBGLR3DECL(int) VbglR3GuestCtrlDirGetRead(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle);
    11231123VBGLR3DECL(int) VbglR3GuestCtrlDirGetRewind(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle);
    11241124/** @} */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette