From: Oliver Kurth Date: Mon, 17 Jun 2019 18:41:36 +0000 (-0700) Subject: Common source file change not directly applicable to open-vm-tools. X-Git-Tag: stable-11.0.0~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b32002d84c1dbb6dbe34586c04b84d26224c5ee;p=thirdparty%2Fopen-vm-tools.git Common source file change not directly applicable to open-vm-tools. --- diff --git a/open-vm-tools/toolbox/toolbox-cmd.c b/open-vm-tools/toolbox/toolbox-cmd.c index 19af5ba3a..b0299ab31 100644 --- a/open-vm-tools/toolbox/toolbox-cmd.c +++ b/open-vm-tools/toolbox/toolbox-cmd.c @@ -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 /* diff --git a/open-vm-tools/toolbox/toolboxCmdInt.h b/open-vm-tools/toolbox/toolboxCmdInt.h index b55e8ecd1..c251f4019 100644 --- a/open-vm-tools/toolbox/toolboxCmdInt.h +++ b/open-vm-tools/toolbox/toolboxCmdInt.h @@ -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 @@ -47,23 +47,31 @@ */ #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 /*