Replace spaces with tabs
authorGunnar Beutner <gunnar@beutner.name>
Wed, 15 Oct 2014 06:45:58 +0000 (08:45 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Wed, 15 Oct 2014 06:48:01 +0000 (08:48 +0200)
refs #7250

lib/base/clicommand.hpp
lib/cli/featuredisablecommand.cpp
lib/cli/featureenablecommand.cpp
lib/cli/featurelistcommand.cpp
lib/cli/featurelistcommand.hpp

index 5abdea6bc66ddea93ca6f38fc281e1a88b6d1537..77af27105f3f1b47fea296884b4211a783ec6ffe 100644 (file)
@@ -56,14 +56,14 @@ public:
        static void Unregister(const std::vector<String>& name);
 
        static bool ParseCommand(int argc, char **argv, boost::program_options::options_description& visibleDesc,
-            boost::program_options::options_description& hiddenDesc,
-            boost::program_options::positional_options_description& positionalDesc,
-            ArgumentCompletionDescription& argCompletionDesc,
-            boost::program_options::variables_map& vm, String& cmdname,
-            CLICommand::Ptr& command, bool autocomplete);
+           boost::program_options::options_description& hiddenDesc,
+           boost::program_options::positional_options_description& positionalDesc,
+           ArgumentCompletionDescription& argCompletionDesc,
+           boost::program_options::variables_map& vm, String& cmdname,
+          CLICommand::Ptr& command, bool autocomplete);
 
        static void ShowCommands(int argc, char **argv,
-            boost::program_options::options_description *visibleDesc = NULL,
+           boost::program_options::options_description *visibleDesc = NULL,
            boost::program_options::options_description *hiddenDesc = NULL,
            ArgumentCompletionDescription *argCompletionDesc = NULL,
            bool autocomplete = false, int autoindex = -1);
index 1dbc6dbbfbc954fa129579d1db4b280101468755..530ed21e79380bd57f69d251cc0083cc9da4141b 100644 (file)
@@ -48,7 +48,7 @@ void FeatureDisableCommand::InitParameters(boost::program_options::options_descr
     boost::program_options::options_description& hiddenDesc,
     ArgumentCompletionDescription& argCompletionDesc) const
 {
-        /* Command doesn't support any parameters. */
+       /* Command doesn't support any parameters. */
 }
 
 /**
@@ -60,46 +60,46 @@ int FeatureDisableCommand::Run(const boost::program_options::variables_map& vm,
 {
 #ifdef _WIN32
        //TODO: Add Windows support
-        Log(LogInformation, "cli", "This command is not available on Windows.");
+       Log(LogInformation, "cli", "This command is not available on Windows.");
 #else
-        String features_enabled_dir = Application::GetSysconfDir() + "/icinga2/features-enabled";
+       String features_enabled_dir = Application::GetSysconfDir() + "/icinga2/features-enabled";
 
-        if (ap.empty()) {
-                Log(LogCritical, "cli", "Cannot disable feature(s). Name(s) are missing!");
-                return 0;
-        }
+       if (ap.empty()) {
+               Log(LogCritical, "cli", "Cannot disable feature(s). Name(s) are missing!");
+               return 0;
+       }
 
-        if (!Utility::PathExists(features_enabled_dir) ) {
-                Log(LogCritical, "cli", "Cannot disable features. Path '" + features_enabled_dir + "' does not exist.");
-                return 0;
-        }
+       if (!Utility::PathExists(features_enabled_dir) ) {
+               Log(LogCritical, "cli", "Cannot disable features. Path '" + features_enabled_dir + "' does not exist.");
+               return 0;
+       }
 
-        std::vector<std::string> errors;
+       std::vector<std::string> errors;
 
-        BOOST_FOREACH(const String& feature, ap) {
-                String target = features_enabled_dir + "/" + feature + ".conf";
+       BOOST_FOREACH(const String& feature, ap) {
+               String target = features_enabled_dir + "/" + feature + ".conf";
 
-                if (!Utility::PathExists(target) ) {
-                        Log(LogCritical, "cli", "Cannot disable feature '" + feature + "'. Target file '" + target + "' does not exist.");
-                        errors.push_back(feature);
-                        continue;
-                }
+               if (!Utility::PathExists(target) ) {
+                       Log(LogCritical, "cli", "Cannot disable feature '" + feature + "'. Target file '" + target + "' does not exist.");
+                       errors.push_back(feature);
+                       continue;
+               }
 
-                if (unlink(target.CStr()) < 0) {
+               if (unlink(target.CStr()) < 0) {
                        Log(LogCritical, "cli", "Cannot disable feature '" + feature + "'. Unlinking target file '" + target +
                            "' failed with error code " + Convert::ToString(errno) + ", \"" + Utility::FormatErrorNumber(errno) + "\".");
-                        errors.push_back(feature);
-                        continue;
+                       errors.push_back(feature);
+                       continue;
                }
 
-                Log(LogInformation, "cli", "Disabling feature " + feature + " in '" + features_enabled_dir + "'.");
-        }
+               Log(LogInformation, "cli", "Disabling feature " + feature + " in '" + features_enabled_dir + "'.");
+       }
 
-        if (!errors.empty()) {
-                Log(LogCritical, "cli", "Cannot disable feature(s): " + boost::algorithm::join(errors, " "));
+       if (!errors.empty()) {
+               Log(LogCritical, "cli", "Cannot disable feature(s): " + boost::algorithm::join(errors, " "));
                errors.clear();
-                return 1;
-        }
+               return 1;
+       }
 
 #endif /* _WIN32 */
 
index 3c318b1d9b9bffb65d4d43add384c364f1e72266..c5f357e9065e53e6d0413ab133c3225ff8f0fd9e 100644 (file)
@@ -48,7 +48,7 @@ void FeatureEnableCommand::InitParameters(boost::program_options::options_descri
     boost::program_options::options_description& hiddenDesc,
     ArgumentCompletionDescription& argCompletionDesc) const
 {
-        /* Command doesn't support any parameters. */
+       /* Command doesn't support any parameters. */
 }
 
 /**
index eaa66ced2a78be0032a933ab700668b3d19708f5..ed40ddb851f2ce693ecca0006796382858a92810 100644 (file)
@@ -48,7 +48,7 @@ void FeatureListCommand::InitParameters(boost::program_options::options_descript
     boost::program_options::options_description& hiddenDesc,
     ArgumentCompletionDescription& argCompletionDesc) const
 {
-        /* Command doesn't support any parameters. */
+       /* Command doesn't support any parameters. */
 }
 
 /**
@@ -58,13 +58,13 @@ void FeatureListCommand::InitParameters(boost::program_options::options_descript
  */
 int FeatureListCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
 {
-        if (!ap.empty()) {
-                Log(LogWarning, "cli", "Ignoring parameters: " + boost::algorithm::join(ap, " "));
-        }
+       if (!ap.empty()) {
+               Log(LogWarning, "cli", "Ignoring parameters: " + boost::algorithm::join(ap, " "));
+       }
 
 #ifdef _WIN32
        //TODO: Add Windows support
-        Log(LogInformation, "cli", "This command is not available on Windows.");
+       Log(LogInformation, "cli", "This command is not available on Windows.");
 #else
        std::vector<String> enabled_features;
        std::vector<String> available_features;
index 350bca2a6a6583891ce08f6b20cb02b98bdd880e..272b0d0ed48859cf852c1e9606ce880147289ddb 100644 (file)
@@ -44,7 +44,7 @@ public:
        virtual int Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const;
 
 private:
-        static void CollectFeatures(const String& feature_file, std::vector<String>& features);
+       static void CollectFeatures(const String& feature_file, std::vector<String>& features);
 
 };