]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common source file change not directly applicable to open-vm-tools.
authorOliver Kurth <okurth@vmware.com>
Mon, 17 Jun 2019 18:41:36 +0000 (11:41 -0700)
committerOliver Kurth <okurth@vmware.com>
Mon, 17 Jun 2019 18:41:36 +0000 (11:41 -0700)
open-vm-tools/toolbox/toolbox-cmd.c
open-vm-tools/toolbox/toolboxCmdInt.h

index 19af5ba3a60c7b90870c16e5e9f8b8e7ef2c0a86..b0299ab31d9e7bf872997d5f0540b44e44d7da11 100644 (file)
@@ -1,4 +1,3 @@
-
 /*********************************************************
  * Copyright (C) 2008-2019 VMware, Inc. All rights reserved.
  *
@@ -101,23 +100,26 @@ ToolboxCmdHelp(const char *progName,
  * The commands table.
  * Must go after function declarations
  */
+#if defined(_WIN32)
+#include "toolboxCmdTableWin32.h"
+#else
 static CmdTable commands[] = {
-   { "timesync",  TimeSync_Command, TRUE,    FALSE,   TimeSync_Help},
-   { "script",    Script_Command,   FALSE,   TRUE,    Script_Help},
+   { "timesync",   TimeSync_Command,   TRUE,  FALSE, TimeSync_Help},
+   { "script",     Script_Command,     FALSE, TRUE,  Script_Help},
 #if !defined(USERWORLD)
-   { "disk",      Disk_Command,     TRUE,    TRUE,    Disk_Help},
+   { "disk",       Disk_Command,       TRUE,  TRUE,  Disk_Help},
 #endif
-   { "stat",      Stat_Command,     TRUE,    FALSE,   Stat_Help},
-   { "device",    Device_Command,   TRUE,    FALSE,   Device_Help},
-#if defined(_WIN32) || \
-   (defined(__linux__) && !defined(OPEN_VM_TOOLS) && !defined(USERWORLD))
-   { "upgrade",   Upgrade_Command,  TRUE,    TRUE,   Upgrade_Help},
+   { "stat",       Stat_Command,       TRUE,  FALSE, Stat_Help},
+   { "device",     Device_Command,     TRUE,  FALSE, Device_Help},
+#if defined(__linux__) && !defined(OPEN_VM_TOOLS) && !defined(USERWORLD)
+   { "upgrade",    Upgrade_Command,    TRUE,  TRUE,  Upgrade_Help},
 #endif
-   { "logging",   Logging_Command,  TRUE,    TRUE,    Logging_Help},
-   { "info",      Info_Command,     TRUE,    TRUE,    Info_Help},
-   { "config",    Config_Command,   TRUE,    TRUE,    Config_Help},
-   { "help",      HelpCommand,      FALSE,   FALSE,   ToolboxCmdHelp},
+   { "logging",    Logging_Command,    TRUE,  TRUE,  Logging_Help},
+   { "info",       Info_Command,       TRUE,  TRUE,  Info_Help},
+   { "config",     Config_Command,     TRUE,  TRUE,  Config_Help},
+   { "help",       HelpCommand,        FALSE, FALSE, ToolboxCmdHelp},
 };
+#endif
 
 
 /*
@@ -316,6 +318,9 @@ ToolsCmd_UnknownEntityError(const char *name,    // IN: command name (argv[0])
  *-----------------------------------------------------------------------------
  */
 
+#if defined(_WIN32)
+#include "toolboxCmdHelpWin32.h"
+#else
 static void
 ToolboxCmdHelp(const char *progName,   // IN
                const char *cmd)        // IN
@@ -337,6 +342,7 @@ ToolboxCmdHelp(const char *progName,   // IN
                           "   upgrade (not available on all operating systems)\n"),
            progName, progName, cmd, progName);
 }
+#endif
 
 
 /*
index b55e8ecd1e17609b22d0a876b9955ae3f3d4e2e7..c251f40196b694a2a8f4aad3e678962627cb2ade 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008-2018 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2019 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
  */
 
 #ifndef EX_USAGE
-#define EX_USAGE 64
+#define EX_USAGE 64 /* command line usage error */
 #endif
 
 #ifndef EX_UNAVAILABLE
-#define EX_UNAVAILABLE 69
+#define EX_UNAVAILABLE 69 /* service unavailable */
+#endif
+
+#ifndef EX_SOFTWARE
+#define EX_SOFTWARE 70 /* internal software error */
+#endif
+
+#ifndef EX_OSERR
+#define EX_OSERR 71 /* system error (e.g., can't fork) */
 #endif
 
 #ifndef EX_OSFILE
-#define EX_OSFILE 72
+#define EX_OSFILE 72 /* critical OS file missing */
 #endif
 
 #ifndef EX_TEMPFAIL
-#define EX_TEMPFAIL 75
+#define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
 #endif
 
 #ifndef EX_NOPERM
-#define EX_NOPERM 77
+#define EX_NOPERM 77 /* permission denied */
 #endif
 
 /*