VirtualBox

Ignore:
Timestamp:
Sep 20, 2012 9:56:07 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80827
Message:

Haiku Additions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp

    r43016 r43363  
    3838
    3939#elif defined(RT_OS_FREEBSD) \
     40   || defined(RT_OS_HAIKU) \
    4041   || defined(RT_OS_LINUX) \
    4142   || defined(RT_OS_SOLARIS)
     
    198199#else
    199200
    200     /* The default implementation. (linux, solaris, freebsd) */
     201    /* The default implementation. (linux, solaris, freebsd, haiku) */
    201202    RTFILE File;
    202203    int rc = RTFileOpen(&File, pszDeviceName, RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
     
    381382    return rc;
    382383
     384#elif defined(RT_OS_HAIKU)
     385        /* The ioctl hook in Haiku does take the len parameter when specified,
     386         * so just use it.
     387         */
     388    int rc = ioctl((int)g_File, iFunction, pvData, cbData);
     389    if (RT_LIKELY(rc == 0))
     390        return VINF_SUCCESS;
     391
     392    /* Positive values are negated VBox error status codes. */
     393    if (rc > 0)
     394        rc = -rc;
     395    else
     396        rc = RTErrConvertFromErrno(errno);
     397    return rc;
     398
    383399#elif defined(VBOX_VBGLR3_XFREE86)
    384400    /* PORTME - This is preferred over the RTFileIOCtl variant below, just be careful with the (int). */
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