VirtualBox

Changeset 4016 in vbox for trunk


Ignore:
Timestamp:
Aug 3, 2007 12:54:43 AM (17 years ago)
Author:
vboxsync
Message:

FreeBSD hacking.

Location:
trunk/src/VBox/HostDrivers/Support
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/Makefile.kmk

    r3888 r4016  
    241241vboxdrv_LIBS          = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
    242242vboxdrv_SOURCES       = \
    243         $(BUILD_TARGET)/SUPDrv-$(BUILD_TARGET).c
    244 #       SUPDRVShared.c
     243        $(BUILD_TARGET)/SUPDrv-$(BUILD_TARGET).c \
     244        SUPDRVShared.c
    245245endif # freebsd
    246246
  • trunk/src/VBox/HostDrivers/Support/SUPDRV.h

    r3888 r4016  
    196196
    197197/* dprintf */
    198 #if defined(DEBUG) && !defined(NO_LOGGING)
     198#if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(RT_OS_FREEBSD)
    199199# ifdef LOG_TO_COM
    200200#  include <VBox/log.h>
     
    208208
    209209/* dprintf2 - extended logging. */
    210 #if defined(RT_OS_DARWIN) || defined(RT_OS_OS2)
     210#if defined(RT_OS_DARWIN) || defined(RT_OS_OS2) || defined(RT_OS_FREEBSD)
    211211# define dprintf2 dprintf
    212212#else
  • trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c

    r3677 r4016  
    5454
    5555
    56 
    5756/*******************************************************************************
    5857*   Internal Functions                                                         *
     
    107106static PSUPDRVSESSION       g_apSessionHashTab[19];
    108107/** Calculates the index into g_apSessionHashTab.*/
    109 #define SESSION_HASH(sfn) ((sfn) % RT_ELEMENTS(g_apSessionHashTab))
     108#define SESSION_HASH(sfn)       ((sfn) % RT_ELEMENTS(g_apSessionHashTab))
    110109
    111110
     
    159158         * Initialize the device extension.
    160159         */
    161         /// @todo rc = supdrvInitDevExt(&g_DevExt);
     160        rc = supdrvInitDevExt(&g_DevExt);
    162161        if (RT_SUCCESS(rc))
    163162        {
     
    191190            else
    192191                printf("vboxdrv: RTSpinlockCreate failed, rc=%d\n", rc);
    193             /// @todo supdrvDeleteDevExt(&g_DevExt);
     192            supdrvDeleteDevExt(&g_DevExt);
    194193        }
    195194        else
     
    218217    }
    219218
    220     rc = 0; /// @todo supdrvDeleteDevExt(&g_DevExt);
     219    rc = supdrvDeleteDevExt(&g_DevExt);
    221220    AssertRC(rc);
    222221
     
    240239}
    241240
     241
    242242static int VBoxDrvFreeBSDClose(struct cdev *dev, int fflag, int devtype, struct thread *td)
    243243{
     
    245245    return EBADF;
    246246}
     247
    247248
    248249static int VBoxDrvFreeBSDIOCtl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
     
    278279}
    279280
     281
     282void VBOXCALL   supdrvOSObjInitCreator(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession)
     283{
     284    NOREF(pObj);
     285    NOREF(pSession);
     286}
     287
     288
     289bool VBOXCALL   supdrvOSObjCanAccess(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession, const char *pszObjName, int *prc)
     290{
     291    NOREF(pObj);
     292    NOREF(pSession);
     293    NOREF(pszObjName);
     294    NOREF(prc);
     295    return false;
     296}
     297
     298
     299SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...)
     300{
     301    va_list va;
     302    char szMsg[256];
     303    int cch;
     304
     305    va_start(va, pszFormat);
     306    cch = RTStrPrintfV(szMsg, sizeof(szMsg), pszFormat, va);
     307    va_end(va);
     308   
     309    printf("%s", szMsg);
     310
     311    return cch;
     312}
     313
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