VirtualBox

Changeset 10486 in vbox


Ignore:
Timestamp:
Jul 10, 2008 8:59:15 PM (17 years ago)
Author:
vboxsync
Message:

cosmetics.

File:
1 edited

Legend:

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

    r10478 r10486  
    5454VBGLR3DECL(int) VbglR3WriteLog(const char *pch, size_t cb)
    5555{
     56#if defined(RT_OS_WINDOWS) /** @todo more OSes could take this route (solaris and freebsd for instance). */
     57    /*
     58     * Handle the entire request in one go.
     59     */
     60    return vbglR3DoIOCtl(VBOXGUEST_IOCTL_LOG(cb), (char *)pch, cb);
     61
     62#else
     63    /*
     64     * *BSD does not accept more than 4KB per ioctl request, while
     65     * Linux can't express sizes above 8KB, so, split it up into 2KB chunks.
     66     */
     67# define STEP 2048
    5668    int rc = VINF_SUCCESS;
    57 
    58 #if defined(RT_OS_WINDOWS)
    59 
    60     rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_LOG(cb), (char *)pch, cb);
    61 #else
    62 
    63     /*
    64      * *BSD does not accept more than 4KB per ioctl request,
    65      * so, split it up into 2KB chunks.
    66      */
    67 #define STEP 2048
    6869    for (size_t off = 0; off < cb && RT_SUCCESS(rc); off += STEP)
    6970    {
     
    7172        rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_LOG(cbStep), (char *)pch + off, cbStep);
    7273    }
    73 #undef STEP
     74# undef STEP
     75    return rc;
    7476#endif
    75     return rc;
    7677}
    7778
     
    8687VBGLR3DECL(int) VbglR3CtlFilterMask(uint32_t fOr, uint32_t fNot)
    8788{
     89#if defined(RT_OS_WINDOWS)
     90    /** @todo Not yet implemented. */
     91    return VERR_NOT_SUPPORTED;
    8892
    89 #if defined(RT_OS_WINDOWS)
    90 
    91     /* @todo Not yet implemented. */
    92     return VINF_SUCCESS;
    9393#else
    9494
     
    107107 * @param   fOr     Capabilities which have been added.
    108108 * @param   fNot    Capabilities which have been removed.
     109 *
     110 * @todo    Move to a different file.
    109111 */
    110112VBGLR3DECL(int) VbglR3SetGuestCaps(uint32_t fOr, uint32_t fNot)
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