VirtualBox

Changeset 23973 in vbox for trunk/src/VBox/Devices/Serial


Ignore:
Timestamp:
Oct 22, 2009 12:34:22 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53801
Message:

*,RTFileOpen: Fixing RTFileOpen flag misdesign: The deny, access and action flags are mandatory now.

Location:
trunk/src/VBox/Devices/Serial
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp

    r23160 r23973  
    12111211/**
    12121212 * Construct a char driver instance.
    1213  * 
     1213 *
    12141214 * @copydoc FNPDMDRVCONSTRUCT
    12151215 */
     
    12881288#else
    12891289
    1290     rc = RTFileOpen(&pThis->DeviceFile, pThis->pszDevicePath, RTFILE_O_OPEN | RTFILE_O_READWRITE);
     1290    rc = RTFileOpen(&pThis->DeviceFile, pThis->pszDevicePath, RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
    12911291# ifdef RT_OS_DARWIN
    12921292    if (RT_SUCCESS(rc))
    1293         rc = RTFileOpen(&pThis->DeviceFileR, pThis->pszDevicePath, RTFILE_O_OPEN | RTFILE_O_READ);
     1293        rc = RTFileOpen(&pThis->DeviceFileR, pThis->pszDevicePath, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
    12941294# endif
    12951295
     
    14951495    NULL,
    14961496    /* pfnDetach */
    1497     NULL, 
     1497    NULL,
    14981498    /* pfnPowerOff */
    1499     NULL, 
     1499    NULL,
    15001500    /* pfnSoftReset */
    15011501    NULL,
  • trunk/src/VBox/Devices/Serial/DrvRawFile.cpp

    r22653 r23973  
    150150     * Open the raw file.
    151151     */
    152     rc = RTFileOpen(&pThis->OutputFile, pThis->pszLocation, RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
     152    rc = RTFileOpen(&pThis->OutputFile, pThis->pszLocation, RTFILE_O_WRITE | RTFILE_O_CREATE_REPLACE | RTFILE_O_DENY_NONE);
    153153    if (RT_FAILURE(rc))
    154154    {
     
    180180
    181181    if (pThis->OutputFile != NIL_RTFILE)
    182     {   
     182    {
    183183        RTFileClose(pThis->OutputFile);
    184184        pThis->OutputFile = NIL_RTFILE;
     
    200200
    201201    if (pThis->OutputFile != NIL_RTFILE)
    202     {   
     202    {
    203203        RTFileClose(pThis->OutputFile);
    204204        pThis->OutputFile = NIL_RTFILE;
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