Changeset 18639 in vbox
- Timestamp:
- Apr 2, 2009 2:06:22 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 3 edited
-
Makefile.kmk (modified) (1 diff)
-
VBoxService.cpp (modified) (5 diffs)
-
VBoxServiceInternal.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk
r18341 r18639 36 36 VBoxService.cpp \ 37 37 VBoxServiceTimeSync.cpp 38 VBoxService_SOURCES.win = \ 39 VBoxService-win.cpp 38 40 VBoxService_SOURCES.os2 = \ 39 41 VBoxService-os2.def \ -
trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp
r18634 r18639 38 38 #include <VBox/VBoxGuest.h> 39 39 #include "VBoxServiceInternal.h" 40 41 40 42 41 /******************************************************************************* … … 90 89 static int VBoxServiceUsage(void) 91 90 { 92 RTPrintf("usage: %s [-f|--foreground] [-v|--verbose] [-i|--interval <seconds>]\n" 93 " [--disable-<service>] [--enable-<service>] [-h|-?|--help]\n", g_pszProgName); 94 for (unsigned j = 0; j < RT_ELEMENTS(g_aServices); j++) 95 RTPrintf(" %s\n", g_aServices[j].pDesc->pszUsage); 91 RTPrintf("usage: %s [-f|--foreground] [-i|--interval <seconds>]" 92 " [--disable-<service>] [--enable-<service>] [-h|-?|--help] [-v|--verbose]", g_pszProgName); 93 94 #if defined(RT_OS_WINDOWS) 95 RTPrintf(" [-r|--register] [-u|--unregister]"); 96 #endif 97 98 for (unsigned j = 0; j < RT_ELEMENTS(g_aServices); j++) 99 RTPrintf(" %s\n", g_aServices[j].pDesc->pszUsage); 100 96 101 RTPrintf("\n" 97 102 "Options:\n" 98 103 #if !defined(RT_OS_WINDOWS) 99 " -f | --foreground Don't daemonzie the program. For debugging.\n" 100 #endif 101 " -v | --verbose Increment the verbosity level. For debugging.\n" 102 " -i | --interval The default interval.\n" 103 " -h | -? | --help Show this message and exit with status 1.\n"); 104 " -h | -? | --help Show this message and exit with status 1.\n" 105 #else 106 " -h | -? | /? | --help Show this message and exit with status 1.\n" 107 #endif 108 " -i | --interval The default interval.\n" 109 #if !defined(RT_OS_WINDOWS) 110 " -f | --foreground Don't daemonzie the program. For debugging.\n" 111 #else 112 " -r | --register Installs the service.\n" 113 " -u | --unregister Uninstall service.\n" 114 #endif 115 " -v | --verbose Increment the verbosity level. For debugging.\n"); 116 117 RTPrintf("\n" 118 "Service specific options:\n"); 104 119 for (unsigned j = 0; j < RT_ELEMENTS(g_aServices); j++) 105 120 { … … 249 264 { 250 265 const char *psz = argv[i]; 251 if (*psz != '-') 266 if( (*psz != '-') 267 #if defined(RT_OS_WINDOWS) 268 && (*psz != '/')) 269 #endif 252 270 return VBoxServiceSyntax("Unknown argument '%s'\n", psz); 253 271 psz++; … … 268 286 else if (MATCHES("interval")) 269 287 psz = "i"; 288 #if defined(RT_OS_WINDOWS) 289 else if (MATCHES("register")) 290 psz = "r"; 291 else if (MATCHES("unregister")) 292 psz = "u"; 293 #endif 270 294 else if (MATCHES("daemonized")) 271 295 { … … 325 349 break; 326 350 351 #if defined(RT_OS_WINDOWS) 352 case 'r': 353 return VBoxServiceWinInstall(); 354 355 case 'u': 356 return VBoxServiceWinUninstall(); 357 #endif 358 327 359 case 'h': 360 #if defined(RT_OS_WINDOWS) 361 case '?': 362 #endif 328 363 return VBoxServiceUsage(); 329 364 -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h
r8155 r18639 5 5 6 6 /* 7 * Copyright (C) 200 7Sun Microsystems, Inc.7 * Copyright (C) 2009 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 22 22 #ifndef ___VBoxServiceInternal_h 23 23 #define ___VBoxServiceInternal_h 24 25 /** Name of this program. */ 26 #if !defined(RT_OS_WINDOWS) 27 #define VBOXSERVICE_NAME "VBoxService" 28 #define VBOXSERVICE_FRIENDLY_NAME "VBoxService" 29 #else 30 #define VBOXSERVICE_NAME _T("VBoxService") 31 #define VBOXSERVICE_FRIENDLY_NAME _T("VBoxService") 32 #endif 24 33 25 34 /** … … 97 106 extern int VBoxServiceArgUInt32(int argc, char **argv, const char *psz, int *pi, uint32_t *pu32, uint32_t u32Min, uint32_t u32Max); 98 107 108 #if defined(RT_OS_WINDOWS) 109 extern int VBoxServiceWinInstall (); 110 extern int VBoxServiceWinUninstall (); 111 #endif 112 99 113 extern VBOXSERVICE g_TimeSync; 100 114 extern VBOXSERVICE g_Clipboard;
Note:
See TracChangeset
for help on using the changeset viewer.

