VirtualBox

Changeset 6118 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 18, 2007 9:55:20 AM (17 years ago)
Author:
vboxsync
Message:

Solaris guest timesync. Daemonize to be fixed.

Added solaris to libxml2 build-it-ourselves platform list. This could change
when Sun ships an updated libxml2. 2.6.23 is utterly un-usable.

Location:
trunk/src/VBox/Additions/common
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/Makefile.kmk

    r6020 r6118  
    2323include $(PATH_SUB_CURRENT)/VBoxGuestLib/Makefile.kmk
    2424include $(PATH_SUB_CURRENT)/VBoxGuest/Makefile.kmk
     25include $(PATH_SUB_CURRENT)/VBoxService/Makefile.kmk
    2526
    2627include $(PATH_KBUILD)/subfooter.kmk
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c

    r6065 r6118  
    3232#include "VBoxGuestInternal.h"
    3333#include <VBox/log.h>
    34 #include <VBox/VBoxGuest.h>
    3534#include <iprt/asm.h>
    3635#include <iprt/assert.h>
     
    497496        RTSpinlockReleaseNoInts(g_Spinlock, &Tmp);
    498497
     498        VBA_LOGCONT("VBoxAddSolarisOpen: pid=%d\n", (int)RTProcSelf());
    499499        Log(("VBoxAddSolarisOpen: g_DevExt=%p pSession=%p rc=%d pid=%d\n", &g_DevExt, pSession, rc, (int)RTProcSelf()));
    500500        return 0;
     
    507507static int VBoxAddSolarisClose(dev_t Dev, int flag, int fType, cred_t *pCred)
    508508{
    509     VBA_LOGCONT("VBoxAddSolarisClose pid=%d=%d\n", (int)RTProcSelf());
     509    VBA_LOGCONT("VBoxAddSolarisClose pid=%d\n", (int)RTProcSelf());
    510510
    511511    /*
     
    625625    if (    Cmd >= VBOXGUEST_IOCTL_VMMREQUEST(0)
    626626        &&  Cmd <= VBOXGUEST_IOCTL_VMMREQUEST(0xfff))
     627    {
    627628        cbBuf = sizeof(VMMDevRequestHeader);
     629        VBA_LOGCONT("VBOXGUEST_IOCTL_VMMREQUEST");
     630    }
    628631#ifdef VBOX_HGCM
    629632    else if (   Cmd >= VBOXGUEST_IOCTL_HGCM_CALL(0)
    630633             && Cmd <= VBOXGUEST_IOCTL_HGCM_CALL(0xfff))
     634    {
    631635        cbBuf = sizeof(VBoxGuestHGCMCallInfo);
     636        VBA_LOGCONT("VBOXGUEST_IOCTL_HGCM_CALL");
     637    }
    632638#endif /* VBOX_HGCM */
    633639    else
     
    637643            case VBOXGUEST_IOCTL_GETVMMDEVPORT:
    638644                cbBuf = sizeof(VBoxGuestPortInfo);
     645                VBA_LOGCONT("VBOXGUEST_IOCTL_GETVMMDEVPORT");
    639646                break;
    640647
    641648            case VBOXGUEST_IOCTL_WAITEVENT:
    642649                cbBuf = sizeof(VBoxGuestWaitEventInfo);
     650                VBA_LOGCONT("VBOXGUEST_IOCTL_WAITEVENT");
    643651                break;
    644652
    645653            case VBOXGUEST_IOCTL_CTL_FILTER_MASK:
    646654                cbBuf = sizeof(VBoxGuestFilterMaskInfo);
     655                VBA_LOGCONT("VBOXGUEST_IOCTL_CTL_FILTER_MASK");
    647656                break;
    648657
     
    650659            case VBOXGUEST_IOCTL_HGCM_CONNECT:
    651660                cbBuf = sizeof(VBoxGuestHGCMConnectInfo);
     661                VBA_LOGCONT("VBOXGUEST_IOCTL_HGCM_CONNECT");
    652662                break;
    653663
    654664            case VBOXGUEST_IOCTL_HGCM_DISCONNECT:
    655665                cbBuf = sizeof(VBoxGuestHGCMDisconnectInfo);
     666                VBA_LOGCONT("VBOXGUEST_IOCTL_HGCM_DISCONNECT");
    656667                break;
    657668
    658669            case VBOXGUEST_IOCTL_CLIPBOARD_CONNECT:
    659670                cbBuf = sizeof(uint32_t);
     671                VBA_LOGCONT("VBOXGUEST_IOCTL_CLIPBOARD_CONNECT");
    660672                break;
    661673#endif /* VBOX_HGCM */
     
    668680        }
    669681    }
    670 
     682#if 0
     683    /* cbBuf must actually get the size based on the VMM request type.
     684     * Anyway, this obtaining cbBuf businesss will be removed eventually.
     685     */
    671686    if (RT_UNLIKELY(cbBuf != IOCPARM_LEN(Cmd)))
    672687    {
     
    674689        return EINVAL;
    675690    }
    676 
     691#endif
     692
     693    cbBuf = IOCPARM_LEN(Cmd);   
    677694    void *pvBuf = RTMemTmpAlloc(cbBuf);
    678695    if (RT_UNLIKELY(!pvBuf))
     
    689706        return EFAULT;
    690707    }
     708    if (RT_UNLIKELY(cbBuf != 0 && !VALID_PTR(pvBuf)))
     709    {
     710        RTMemTmpFree(pvBuf);
     711        VBA_LOGNOTE("VBoxAddSolarisIOCtl: pvBuf invalid pointer %p\n", pvBuf);
     712    }
    691713
    692714    size_t cbDataReturned;
    693715    rc = VBoxGuestCommonIOCtl(Cmd, &g_DevExt, pSession, pvBuf, cbBuf, &cbDataReturned);
    694     if (RT_LIKELY(!rc))
     716    if (RT_SUCCESS(rc))
    695717    {
    696718        if (RT_UNLIKELY(cbDataReturned > cbBuf))
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp

    r6020 r6118  
    3333#include <iprt/mem.h>
    3434#include <VBox/VBoxGuest.h>
    35 
    3635
    3736/*******************************************************************************
     
    9897    g_File = hf;
    9998
     99#elif defined(RT_OS_SOLARIS)
     100    RTFILE File;
     101    int rc = RTFileOpen(&File, VBOXGUEST_DEVICE_NAME, RTFILE_O_READWRITE);
     102    if (RT_FAILURE(rc))
     103        return rc;
     104    g_File = File;
     105
    100106#else
    101107    /* the default implemenation. */
  • trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk

    r6029 r6118  
    3434        VBoxService-os2.def \
    3535        VBoxServiceClipboard-os2.cpp
     36VBoxService_SOURCES.solaris = \
     37    VBoxService-solaris.cpp
    3638VBoxService_LIBS          = \
    3739        $(VBOX_LIB_VBGL_R3) \
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp

    r6029 r6118  
    4747/** Shutdown the main thread. (later, for signals) */
    4848bool volatile g_fShutdown;
     49#ifndef RT_OS_OS2
     50extern int daemon(int nochdir, int noclose);
     51#endif
    4952
    5053/**
     
    273276                if (cch > sizeof("enable-") && !memcmp(psz, "enable-", sizeof("enable-") - 1))
    274277                    for (unsigned j = 0; !fFound && j < RT_ELEMENTS(g_aServices); j++)
     278#if defined(RT_OS_OS2)
    275279                        if ((fFound = !stricmp(psz + sizeof("enable-") - 1, g_aServices[j].pDesc->pszName)))
     280#else
     281                        if ((fFound = !strcasecmp(psz + sizeof("enable-") - 1, g_aServices[j].pDesc->pszName)))
     282#endif
    276283                            g_aServices[j].fEnabled = true;
    277284
    278285                if (cch > sizeof("disable-") && !memcmp(psz, "disable-", sizeof("disable-") - 1))
    279286                    for (unsigned j = 0; !fFound && j < RT_ELEMENTS(g_aServices); j++)
     287#if defined(RT_OS_OS2)
    280288                        if ((fFound = !stricmp(psz + sizeof("disable-") - 1, g_aServices[j].pDesc->pszName)))
     289#else
     290                        if ((fFound = !strcasecmp(psz + sizeof("disable-") - 1, g_aServices[j].pDesc->pszName)))
     291#endif
    281292                            g_aServices[j].fEnabled = false;
    282293
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceTimeSync.cpp

    r6029 r6118  
    240240                    struct timeval tv;
    241241# if !defined(RT_OS_OS2) /* PORTME */
    242                     RTTimeSpecGetTimeval(Drift, &tv);
     242                    RTTimeSpecGetTimeval(&Drift, &tv);
    243243                    if (adjtime(&tv, NULL) == 0)
    244244                    {
     
    343343    "                        with to calculate the dynamic minimum adjust time.\n"
    344344    "                        The default is 8 times.\n"
    345     "    --timesync-max-latency     The max host timer query latency to accpet.\n"
     345    "    --timesync-max-latency     The max host timer query latency to accept.\n"
    346346    "                        The default is 250 ms.\n"
    347347    ,
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