summaryrefslogtreecommitdiff
path: root/tools/Config.cpp
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2019-11-06 10:07:32 +0100
committerJan Holesovsky <kendy@collabora.com>2019-11-07 12:23:47 +0100
commit5b5e29b4303ffff0b8e2fc91bcccd772a42a78f7 (patch)
tree2b4f234aba5161cd5ac5e5e37336d49e864b765d /tools/Config.cpp
parent58b4734f9e18b652bfc0eee8e1fef476e5dd62d7 (diff)
killpoco: Don't use POCO for app exit values.
Change-Id: I2948ac45a7b4243f7afde08d5245530fdbf9a070 Reviewed-on: https://gerrit.libreoffice.org/82125 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'tools/Config.cpp')
-rw-r--r--tools/Config.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/Config.cpp b/tools/Config.cpp
index 2cf45ac3f..754062a4e 100644
--- a/tools/Config.cpp
+++ b/tools/Config.cpp
@@ -12,6 +12,7 @@
#include <iostream>
#include <iomanip>
#include <sstream>
+#include <sysexits.h>
#include <termios.h>
#include <openssl/rand.h>
@@ -164,7 +165,7 @@ void Config::handleOption(const std::string& optionName, const std::string& opti
if (optionName == "help")
{
displayHelp();
- std::exit(Application::EXIT_OK);
+ std::exit(EX_OK);
}
else if (optionName == "config-file")
{
@@ -219,10 +220,10 @@ int Config::main(const std::vector<std::string>& args)
{
std::cerr << "Nothing to do." << std::endl;
displayHelp();
- return Application::EXIT_NOINPUT;
+ return EX_NOINPUT;
}
- int retval = Application::EXIT_OK;
+ int retval = EX_OK;
bool changed = false;
_loolConfig.load(ConfigFile);
@@ -262,7 +263,7 @@ int Config::main(const std::vector<std::string>& args)
if (adminPwd != reAdminPwd)
{
std::cout << "Password mismatch." << std::endl;
- return Application::EXIT_DATAERR;
+ return EX_DATAERR;
}
// Do the magic !
@@ -297,7 +298,7 @@ int Config::main(const std::vector<std::string>& args)
changed = true;
#else
std::cerr << "This application was compiled with old OpenSSL. Operation not supported. You can use plain text password in /etc/loolwsd/loolwsd.xml." << std::endl;
- return Application::EXIT_UNAVAILABLE;
+ return EX_UNAVAILABLE;
#endif
}
#if ENABLE_SUPPORT_KEY