VirtualBox

Changeset 10651 in vbox


Ignore:
Timestamp:
Jul 15, 2008 12:31:56 PM (17 years ago)
Author:
vboxsync
Message:

Additions/common: removed default argument to VbglR3Daemonize

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuest.h

    r10635 r10651  
    14851485VBGLR3DECL(int)     VbglR3WriteLog(const char *pch, size_t cb);
    14861486VBGLR3DECL(int)     VbglR3CtlFilterMask(uint32_t fOr, uint32_t fNot);
    1487 VBGLR3DECL(int)     VbglR3Daemonize(
    1488 #ifdef __cplusplus
    1489     bool fNoChDir,
    1490     bool fNoClose,
    1491     char const *pszPidfile = NULL
    1492 #else
    1493     bool fNoChDir,
    1494     bool fNoClose,
    1495     char const *pszPidfile
    1496 #endif
    1497     );
     1487VBGLR3DECL(int)     VbglR3Daemonize(bool fNoChDir, bool fNoClose, char const *pszPidfile);
    14981488VBGLR3DECL(int)     VbglR3SetGuestCaps(uint32_t fOr, uint32_t fNot);
    14991489
  • trunk/src/VBox/Additions/x11/xclient/main.cpp

    r9791 r10651  
    2525#include <iprt/initterm.h>
    2626#include <iprt/path.h>
     27#include <iprt/stream.h>
    2728
    2829#include <sys/types.h>
     
    4546#endif
    4647
    47 #define TRACE printf("%s: %d\n", __PRETTY_FUNCTION__, __LINE__); Log(("%s: %d\n", __PRETTY_FUNCTION__, __LINE__))
     48#define TRACE RTPrintf("%s: %d\n", __PRETTY_FUNCTION__, __LINE__); Log(("%s: %d\n", __PRETTY_FUNCTION__, __LINE__))
    4849
    4950static int (*gpfnOldIOErrorHandler)(Display *) = NULL;
     
    139140    /** Disable seamless mode */
    140141    VbglR3SeamlessSetCap(false);
    141     printf(("VBoxClient: terminating...\n"));
     142    RTPrintf(("VBoxClient: terminating...\n"));
    142143    /* don't call VbglR3Term() here otherwise the /dev/vboxadd filehandle is closed */
    143144    /* Our pause() call will now return and exit. */
     
    173174void vboxClientUsage(const char *pcszFileName)
    174175{
    175     printf("Usage: %s [-d|--nodaemon]\n", pcszFileName);
    176     printf("Start the VirtualBox X Window System guest services.\n\n");
    177     printf("Options:\n");
    178     printf("  -d, --nodaemon   do not lower privileges and continue running as a system\n");
    179     printf("                   service\n");
     176    RTPrintf("Usage: %s [-d|--nodaemon]\n", pcszFileName);
     177    RTPrintf("Start the VirtualBox X Window System guest services.\n\n");
     178    RTPrintf("Options:\n");
     179    RTPrintf("  -d, --nodaemon   do not lower privileges and continue running as a system\n");
     180    RTPrintf("                   service\n");
     181    RTPrintf("\n");
    180182    exit(0);
    181183}
     
    193195        pszFileName = "VBoxClient";
    194196
     197    /* Initialise our runtime before all else. */
     198    RTR3Init(false);
     199
    195200    /* Parse our option(s) */
    196201    /** @todo Use RTGetOpt() if the arguments become more complex. */
     
    206211        else
    207212        {
    208             printf("%s: unrecognized option `%s'\n", pszFileName, argv[i]);
    209             printf("Try `%s --help' for more information\n", pszFileName);
     213            RTPrintf("%s: unrecognized option `%s'\n", pszFileName, argv[i]);
     214            RTPrintf("Try `%s --help' for more information\n", pszFileName);
    210215            exit(1);
    211216        }
     
    213218    if (fDaemonise)
    214219    {
    215         rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */);
     220        rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */,
     221                             NULL);
    216222        if (RT_FAILURE(rc))
    217223        {
    218             printf("VBoxClient: failed to daemonize. exiting.");
     224            RTPrintf("VBoxClient: failed to daemonize. exiting.\n");
     225#ifdef DEBUG
     226            RTPrintf("Error %Rrc\n", rc);
     227#endif
    219228            return 1;
    220229        }
    221230    }
    222     /* Initialise our runtime before all else. */
    223     RTR3Init(false);
     231    /* Initialise the guest library. */
    224232    if (RT_FAILURE(VbglR3Init()))
    225233    {
    226         printf("Failed to connect to the VirtualBox kernel service");
     234        RTPrintf("Failed to connect to the VirtualBox kernel service\n");
    227235        return 1;
    228236    }
     
    233241    if (!XInitThreads() || !XtToolkitThreadInitialize())
    234242    {
    235         LogRel(("VBoxClient: error initialising threads in X11, exiting."));
     243        LogRel(("VBoxClient: error initialising threads in X11, exiting.\n"));
    236244        return 1;
    237245    }
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