]> Kevux Git Server - fll/commitdiff
Bugfix: The Entry is not printing on simulate and validate combined mode.
authorKevin Day <kevin@kevux.org>
Sat, 11 Mar 2023 06:25:28 +0000 (00:25 -0600)
committerKevin Day <kevin@kevux.org>
Sat, 11 Mar 2023 06:25:28 +0000 (00:25 -0600)
I must have not gotten around to doing this.
Now there entry and settings information is printed.

level_3/controller/c/common/private-common.c
level_3/controller/c/common/private-common.h
level_3/controller/c/entry/private-entry.c
level_3/controller/c/entry/private-entry.h
level_3/controller/c/thread/private-thread_entry.c

index 18aeb4485626673bcdd1d1bb74fe4954613e117f..4dbc5645380a8c414634c17038729c59edd08f2b 100644 (file)
@@ -30,6 +30,7 @@ extern "C" {
   const f_string_static_t controller_default_s = macro_f_string_static_t_initialize(CONTROLLER_default_s, 0, CONTROLLER_default_s_length);
   const f_string_static_t controller_define_s = macro_f_string_static_t_initialize(CONTROLLER_define_s, 0, CONTROLLER_define_s_length);
   const f_string_static_t controller_delay_s = macro_f_string_static_t_initialize(CONTROLLER_delay_s, 0, CONTROLLER_delay_s_length);
+  const f_string_static_t controller_directory_s = macro_f_string_static_t_initialize(CONTROLLER_directory_s, 0, CONTROLLER_directory_s_length);
   const f_string_static_t controller_disable_s = macro_f_string_static_t_initialize(CONTROLLER_disable_s, 0, CONTROLLER_disable_s_length);
   const f_string_static_t controller_engine_s = macro_f_string_static_t_initialize(CONTROLLER_engine_s, 0, CONTROLLER_engine_s_length);
   const f_string_static_t controller_entry_s = macro_f_string_static_t_initialize(CONTROLLER_entry_s, 0, CONTROLLER_entry_s_length);
@@ -44,6 +45,7 @@ extern "C" {
   const f_string_static_t controller_failsafe_s = macro_f_string_static_t_initialize(CONTROLLER_failsafe_s, 0, CONTROLLER_failsafe_s_length);
   const f_string_static_t controller_failure_s = macro_f_string_static_t_initialize(CONTROLLER_failure_s, 0, CONTROLLER_failure_s_length);
   const f_string_static_t controller_fifo_s = macro_f_string_static_t_initialize(CONTROLLER_fifo_s, 0, CONTROLLER_fifo_s_length);
+  const f_string_static_t controller_file_s = macro_f_string_static_t_initialize(CONTROLLER_file_s, 0, CONTROLLER_file_s_length);
   const f_string_static_t controller_freeze_s = macro_f_string_static_t_initialize(CONTROLLER_freeze_s, 0, CONTROLLER_freeze_s_length);
   const f_string_static_t controller_fsize_s = macro_f_string_static_t_initialize(CONTROLLER_fsize_s, 0, CONTROLLER_fsize_s_length);
   const f_string_static_t controller_full_path_s = macro_f_string_static_t_initialize(CONTROLLER_full_path_s, 0, CONTROLLER_full_path_s_length);
@@ -86,6 +88,7 @@ extern "C" {
   const f_string_static_t controller_pid_file_s = macro_f_string_static_t_initialize(CONTROLLER_pid_file_s, 0, CONTROLLER_pid_file_s_length);
   const f_string_static_t controller_processor_s = macro_f_string_static_t_initialize(CONTROLLER_processor_s, 0, CONTROLLER_processor_s_length);
   const f_string_static_t controller_program_s = macro_f_string_static_t_initialize(CONTROLLER_program_s, 0, CONTROLLER_program_s_length);
+  const f_string_static_t controller_readonly_s = macro_f_string_static_t_initialize(CONTROLLER_readonly_s, 0, CONTROLLER_readonly_s_length);
   const f_string_static_t controller_ready_s = macro_f_string_static_t_initialize(CONTROLLER_ready_s, 0, CONTROLLER_ready_s_length);
   const f_string_static_t controller_reboot_s = macro_f_string_static_t_initialize(CONTROLLER_reboot_s, 0, CONTROLLER_reboot_s_length);
   const f_string_static_t controller_reload_s = macro_f_string_static_t_initialize(CONTROLLER_reload_s, 0, CONTROLLER_reload_s_length);
@@ -134,6 +137,7 @@ extern "C" {
 
   const f_string_static_t controller_Entry_s = macro_f_string_static_t_initialize(CONTROLLER_Entry_s, 0, CONTROLLER_Entry_s_length);
   const f_string_static_t controller_Exit_s = macro_f_string_static_t_initialize(CONTROLLER_Exit_s, 0, CONTROLLER_Exit_s_length);
+  const f_string_static_t controller_Item_s = macro_f_string_static_t_initialize(CONTROLLER_Item_s, 0, CONTROLLER_Item_s_length);
 
   const f_string_static_t controller_parameter_map_option_s = macro_f_string_static_t_initialize(CONTROLLER_parameter_map_option_s, 0, CONTROLLER_parameter_map_option_s_length);
   const f_string_static_t controller_parameter_map_value_s = macro_f_string_static_t_initialize(CONTROLLER_parameter_map_value_s, 0, CONTROLLER_parameter_map_value_s_length);
index 01a47df3a63fbe32e84a9de945ded85bbaaeb870..a70bb9e1be7ca19a934b50a1d5655cd160d4b183 100644 (file)
@@ -54,6 +54,7 @@ extern "C" {
   #define CONTROLLER_default_s       "default"
   #define CONTROLLER_define_s        "define"
   #define CONTROLLER_delay_s         "delay"
+  #define CONTROLLER_directory_s     "directory"
   #define CONTROLLER_disable_s       "disable"
   #define CONTROLLER_engine_s        "engine"
   #define CONTROLLER_entry_s         "entry"
@@ -68,6 +69,7 @@ extern "C" {
   #define CONTROLLER_failsafe_s      "failsafe"
   #define CONTROLLER_failure_s       "failure"
   #define CONTROLLER_fifo_s          "fifo"
+  #define CONTROLLER_file_s          "file"
   #define CONTROLLER_freeze_s        "freeze"
   #define CONTROLLER_fsize_s         "fsize"
   #define CONTROLLER_full_path_s     "full_path"
@@ -110,6 +112,7 @@ extern "C" {
   #define CONTROLLER_pid_file_s      "pid_file"
   #define CONTROLLER_processor_s     "processor"
   #define CONTROLLER_program_s       "program"
+  #define CONTROLLER_readonly_s      "readonly"
   #define CONTROLLER_ready_s         "ready"
   #define CONTROLLER_reboot_s        "reboot"
   #define CONTROLLER_reload_s        "reload"
@@ -158,6 +161,7 @@ extern "C" {
 
   #define CONTROLLER_Entry_s "Entry"
   #define CONTROLLER_Exit_s  "Exit"
+  #define CONTROLLER_Item_s  "Item"
 
   #define CONTROLLER_parameter_map_option_s ":option"
   #define CONTROLLER_parameter_map_value_s  ":value"
@@ -187,6 +191,7 @@ extern "C" {
   #define CONTROLLER_define_s_length        6
   #define CONTROLLER_delay_s_length         5
   #define CONTROLLER_disable_s_length       7
+  #define CONTROLLER_directory_s_length     9
   #define CONTROLLER_engine_s_length        6
   #define CONTROLLER_entry_s_length         5
   #define CONTROLLER_entries_s_length       7
@@ -200,6 +205,7 @@ extern "C" {
   #define CONTROLLER_failure_s_length       7
   #define CONTROLLER_failsafe_s_length      8
   #define CONTROLLER_fifo_s_length          4
+  #define CONTROLLER_file_s_length          4
   #define CONTROLLER_freeze_s_length        6
   #define CONTROLLER_fsize_s_length         5
   #define CONTROLLER_full_path_s_length     9
@@ -242,6 +248,7 @@ extern "C" {
   #define CONTROLLER_pid_file_s_length      8
   #define CONTROLLER_processor_s_length     9
   #define CONTROLLER_program_s_length       7
+  #define CONTROLLER_readonly_s_length      8
   #define CONTROLLER_ready_s_length         5
   #define CONTROLLER_reboot_s_length        6
   #define CONTROLLER_reload_s_length        6
@@ -290,6 +297,7 @@ extern "C" {
 
   #define CONTROLLER_Entry_s_length 5
   #define CONTROLLER_Exit_s_length  4
+  #define CONTROLLER_Item_s_length  4
 
   #define CONTROLLER_parameter_map_option_s_length 7
   #define CONTROLLER_parameter_map_value_s_length  6
@@ -318,6 +326,7 @@ extern "C" {
   extern const f_string_static_t controller_default_s;
   extern const f_string_static_t controller_define_s;
   extern const f_string_static_t controller_delay_s;
+  extern const f_string_static_t controller_directory_s;
   extern const f_string_static_t controller_disable_s;
   extern const f_string_static_t controller_engine_s;
   extern const f_string_static_t controller_entry_s;
@@ -332,6 +341,7 @@ extern "C" {
   extern const f_string_static_t controller_failsafe_s;
   extern const f_string_static_t controller_failure_s;
   extern const f_string_static_t controller_fifo_s;
+  extern const f_string_static_t controller_file_s;
   extern const f_string_static_t controller_freeze_s;
   extern const f_string_static_t controller_fsize_s;
   extern const f_string_static_t controller_full_path_s;
@@ -374,6 +384,7 @@ extern "C" {
   extern const f_string_static_t controller_pid_file_s;
   extern const f_string_static_t controller_processor_s;
   extern const f_string_static_t controller_program_s;
+  extern const f_string_static_t controller_readonly_s;
   extern const f_string_static_t controller_ready_s;
   extern const f_string_static_t controller_reboot_s;
   extern const f_string_static_t controller_reload_s;
@@ -422,6 +433,7 @@ extern "C" {
 
   extern const f_string_static_t controller_Entry_s;
   extern const f_string_static_t controller_Exit_s;
+  extern const f_string_static_t controller_Item_s;
 
   extern const f_string_static_t controller_parameter_map_option_s;
   extern const f_string_static_t controller_parameter_map_value_s;
index c9cf31ddef90bb6773a474215ac8b1310a0455c1..110c1d911555036a8a20bb9e5fdfc678eed8ce8f 100644 (file)
@@ -2323,6 +2323,391 @@ extern "C" {
   }
 #endif // _di_controller_entry_settings_read_map_
 
+#ifndef _di_controller_entry_setting_validate_
+  void controller_entry_setting_validate(const controller_global_t global, const bool is_entry, controller_cache_t * const cache) {
+
+    controller_entry_t * const entry = is_entry ? &global.setting->entry : &global.setting->exit;
+
+    controller_lock_print(global.main->output.to, global.thread);
+
+    const f_string_static_t *string = 0;
+
+    f_status_t status = F_none;
+    f_array_length_t i = 0;
+    f_array_length_t j = 0;
+
+    fl_print_format("%r%Q %[%Q%] {%r", global.main->output.to.stream, f_string_eol_s, is_entry ? controller_Entry_s : controller_Exit_s, global.main->context.set.title, controller_settings_s, global.main->context.set.title, f_string_eol_s);
+
+
+    // Mode.
+    if (global.setting->mode == controller_setting_mode_service_e) {
+      string = &controller_mode_s;
+    }
+    else if (global.setting->mode == controller_setting_mode_helper_e) {
+      string = &controller_helper_s;
+    }
+    else if (global.setting->mode == controller_setting_mode_program_e) {
+      string = &controller_program_s;
+    }
+    else {
+      string = &f_string_empty_s;
+    }
+
+    fl_print_format("  %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_mode_s, global.main->context.set.important, f_string_eol_s);
+
+    if (string->used) {
+      fl_print_format(" %r", global.main->output.to.stream, *string);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Session.
+    if (entry->pid == controller_entry_session_new_e) {
+      string = &controller_new_s;
+    }
+    else if (entry->pid == controller_entry_session_same_e) {
+      string = &controller_same_s;
+    }
+    else {
+      string = &f_string_empty_s;
+    }
+
+    fl_print_format("  %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_session_s, global.main->context.set.important, f_string_eol_s);
+
+    if (string->used) {
+      fl_print_format(" %r", global.main->output.to.stream, *string, f_string_eol_s);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Show.
+    if (entry->pid == controller_entry_show_normal_e) {
+      string = &controller_normal_s;
+    }
+    else if (entry->pid == controller_entry_show_init_e) {
+      string = &controller_init_s;
+    }
+    else {
+      string = &f_string_empty_s;
+    }
+
+    fl_print_format("  %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_show_s, global.main->context.set.important, f_string_eol_s);
+
+    if (string->used) {
+      fl_print_format(" %r", global.main->output.to.stream, *string, f_string_eol_s);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Pid.
+    if (entry->pid == controller_entry_pid_disable_e) {
+      string = &controller_disable_s;
+    }
+    else if (entry->pid == controller_entry_pid_require_e) {
+      string = &controller_require_s;
+    }
+    else if (entry->pid == controller_entry_pid_ready_e) {
+      string = &controller_ready_s;
+    }
+    else {
+      string = &f_string_empty_s;
+    }
+
+    fl_print_format("  %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_pid_s, global.main->context.set.important);
+
+    if (string->used) {
+      fl_print_format(" %r", global.main->output.to.stream, *string);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Pid File.
+    fl_print_format("  %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_pid_file_s, global.main->context.set.important);
+
+    if (global.setting->path_pid.used) {
+      fl_print_format(" %r", global.main->output.to.stream, global.setting->path_pid);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Control.
+    fl_print_format("  %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_control_s, global.main->context.set.important);
+
+    if (global.setting->path_control.used) {
+      fl_print_format(" %Q", global.main->output.to.stream, global.setting->path_control);
+    }
+
+    if (global.setting->control.flag & controller_control_flag_readonly_e) {
+      fl_print_format(" %r", global.main->output.to.stream, controller_readonly_s);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Control User.
+    fl_print_format("  %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_control_user_s, global.main->context.set.important);
+
+    if (global.setting->control.flag & controller_control_flag_has_user_e) {
+      fl_print_format(" %u", global.main->output.to.stream, (unsigned int) global.setting->control.user);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Control Group.
+    fl_print_format("  %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_control_group_s, global.main->context.set.important);
+
+    if (global.setting->control.flag & controller_control_flag_has_group_e) {
+      fl_print_format(" %u", global.main->output.to.stream, (unsigned int) global.setting->control.group);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Control Mode.
+    fl_print_format("  %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_control_mode_s, global.main->context.set.important);
+
+    if (F_status_is_error_not(status)) {
+      if (global.setting->control.flag & controller_control_flag_has_group_e) {
+        fl_print_format(" %@05u", global.main->output.to.stream, (unsigned int) global.setting->control.mode);
+      }
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Timeout: Exit.
+    fl_print_format("  %[%r%] %r", global.main->output.to.stream, global.main->context.set.important, controller_timeout_s, global.main->context.set.important, controller_exit_s);
+
+    if (!(entry->flag & controller_entry_flag_timeout_exit_no_e)) {
+      fl_print_format(" %ul", global.main->output.to.stream, entry->timeout_exit, f_string_eol_s);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Timeout: Kill.
+    fl_print_format("  %[%r%] %r", global.main->output.to.stream, global.main->context.set.important, controller_timeout_s, global.main->context.set.important, controller_kill_s);
+
+    if (!(entry->flag & controller_entry_flag_timeout_kill_no_e)) {
+      fl_print_format(" %ul", global.main->output.to.stream, entry->timeout_kill, f_string_eol_s);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Timeout: Start.
+    fl_print_format("  %[%r%] %r", global.main->output.to.stream, global.main->context.set.important, controller_timeout_s, global.main->context.set.important, controller_start_s);
+
+    if (!(entry->flag & controller_entry_flag_timeout_start_no_e)) {
+      fl_print_format(" %ul", global.main->output.to.stream, entry->timeout_start, f_string_eol_s);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Timeout: Stop.
+    fl_print_format("  %[%r%] %r", global.main->output.to.stream, global.main->context.set.important, controller_timeout_s, global.main->context.set.important, controller_stop_s);
+
+    if (!(entry->flag & controller_entry_flag_timeout_stop_no_e)) {
+      fl_print_format(" %ul", global.main->output.to.stream, entry->timeout_stop, f_string_eol_s);
+    }
+
+    fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Define.
+    fl_print_format("  %[%r%] {%r", global.main->output.to.stream, global.main->context.set.important, controller_define_s, global.main->context.set.important, f_string_eol_s);
+
+    for (i = 0; i < entry->define.used; ++i) {
+      fl_print_format("    %Q %Q%r", global.main->output.to.stream, entry->define.array[i].name, entry->define.array[i].value, f_string_eol_s);
+    } // for
+
+    fl_print_format("  }%r", global.main->output.to.stream, f_string_eol_s, f_string_eol_s);
+
+
+    // Parameter.
+    fl_print_format("  %[%r%] {%r", global.main->output.to.stream, global.main->context.set.important, controller_parameter_s, global.main->context.set.important, f_string_eol_s);
+
+    for (i = 0; i < entry->parameter.used; ++i) {
+      fl_print_format("    %Q %Q%r", global.main->output.to.stream, entry->parameter.array[i].name, entry->parameter.array[i].value, f_string_eol_s);
+    } // for
+
+    fl_print_format("  }%r", global.main->output.to.stream, f_string_eol_s);
+
+    fl_print_format("}%r", global.main->output.to.stream, f_string_eol_s);
+
+
+    // Entry Items.
+    if (entry->items.used) {
+      controller_entry_action_t *action = 0;
+      bool raw = F_false;
+      f_array_length_t k = 0;
+
+      for (i = 0; i < entry->items.used; ++i) {
+
+        fl_print_format("%r%Q %Q %[%Q%] {%r", global.main->output.to.stream, f_string_eol_s, is_entry ? controller_Entry_s : controller_Exit_s, controller_Item_s, global.main->context.set.title, entry->items.array[i].name, global.main->context.set.title, f_string_eol_s);
+
+        for (j = 0; j < entry->items.array[i].actions.used; ++j) {
+
+          action = &entry->items.array[i].actions.array[j];
+
+          fl_print_format("  %[%r%] {%r", global.main->output.to.stream, global.main->context.set.important, controller_action_s, global.main->context.set.important, f_string_eol_s);
+
+
+          // Item Type.
+          if (action->type == controller_entry_action_type_consider_e) {
+            string = &controller_consider_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_execute_e) {
+            string = &controller_execute_s;
+            raw = F_true;
+          }
+          else if (action->type == controller_entry_action_type_failsafe_e) {
+            string = &controller_failsafe_s;
+            raw = F_true;
+          }
+          else if (action->type == controller_entry_action_type_freeze_e) {
+            string = &controller_freeze_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_item_e) {
+            string = &controller_item_s;
+            raw = F_true;
+          }
+          else if (action->type == controller_entry_action_type_kexec_e) {
+            string = &controller_kexec_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_kill_e) {
+            string = &controller_kill_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_pause_e) {
+            string = &controller_pause_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_ready_e) {
+            string = &controller_ready_s;
+            raw = F_true;
+          }
+          else if (action->type == controller_entry_action_type_reboot_e) {
+            string = &controller_reboot_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_reload_e) {
+            string = &controller_reload_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_restart_e) {
+            string = &controller_restart_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_resume_e) {
+            string = &controller_resume_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_shutdown_e) {
+            string = &controller_shutdown_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_start_e) {
+            string = &controller_start_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_stop_e) {
+            string = &controller_stop_s;
+            raw = F_false;
+          }
+          else if (action->type == controller_entry_action_type_timeout_e) {
+            string = &controller_timeout_s;
+            raw = F_true;
+          }
+          else if (action->type == controller_entry_action_type_thaw_e) {
+            string = &controller_thaw_s;
+            raw = F_false;
+          }
+          else {
+            string = &f_string_empty_s;
+          }
+
+          fl_print_format("    %[%r%] %r%r", global.main->output.to.stream, global.main->context.set.important, controller_type_s, global.main->context.set.important, *string, f_string_eol_s);
+
+
+          // Item Code (How).
+          fl_print_format("    %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_how_s, global.main->context.set.important);
+
+          if (action->code) {
+            if (action->code == controller_entry_rule_code_asynchronous_d) {
+              fl_print_format(" %r", global.main->output.to.stream, controller_asynchronous_s);
+            }
+
+            if (action->type == controller_entry_rule_code_require_d) {
+              fl_print_format(" %r", global.main->output.to.stream, controller_require_s);
+            }
+
+            if (action->type == controller_entry_rule_code_wait_d) {
+              fl_print_format(" %r", global.main->output.to.stream, controller_wait_s);
+            }
+          }
+
+          fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+          // Parameters.
+          if (action->type == controller_entry_action_type_item_e) {
+            fl_print_format("    %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_item_s, global.main->context.set.important);
+
+            if (action->parameters.used && action->parameters.array[0].used) {
+              fl_print_format(" %Q", global.main->output.to.stream, action->parameters.array[0], f_string_eol_s);
+            }
+
+            fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+          }
+          else if (raw) {
+            for (k = 0; k < action->parameters.used; ++k) {
+              fl_print_format("    %[%r%] %Q%r", global.main->output.to.stream, global.main->context.set.important, controller_parameter_s, global.main->context.set.important, action->parameters.array[k], f_string_eol_s);
+            } // for
+          }
+          else {
+
+            // Parameter, Directory.
+            fl_print_format("    %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_directory_s, global.main->context.set.important);
+
+            if (action->parameters.used && action->parameters.array[0].used) {
+              fl_print_format(" %Q", global.main->output.to.stream, action->parameters.array[0], f_string_eol_s);
+            }
+
+            fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+
+
+            // Parameter, File.
+            fl_print_format("    %[%r%]", global.main->output.to.stream, global.main->context.set.important, controller_file_s, global.main->context.set.important);
+
+            if (action->parameters.used && action->parameters.array[0].used > 1) {
+              fl_print_format(" %Q", global.main->output.to.stream, action->parameters.array[1], f_string_eol_s);
+            }
+
+            fl_print_format("%r", global.main->output.to.stream, f_string_eol_s);
+          }
+
+          fl_print_format("  }%r", global.main->output.to.stream, f_string_eol_s);
+        } // for
+
+        fl_print_format("}%r", global.main->output.to.stream, f_string_eol_s);
+      } // for
+    }
+
+    controller_unlock_print_flush(global.main->output.to, global.thread);
+  }
+#endif // _di_controller_entry_setting_validate_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 73576cadbaea341399d32f42098f2cf8b8711958..787cbf59a83cbb4e2deade3c87b4d7988d3eab94 100644 (file)
@@ -234,6 +234,23 @@ extern "C" {
   f_status_t controller_entry_settings_read_map(const f_string_static_t buffer, const f_string_ranges_t ranges, f_string_maps_t *setting_maps) F_attribute_visibility_internal_d;
 #endif // _di_controller_entry_settings_read_map_
 
+/**
+ * Perform a simulated execution of the given entry.
+ *
+ * This simply prints information about the entry.
+ *
+ * @param global
+ *   The global data.
+ * @param is_entry
+ *   If TRUE, then this is an entry.
+ *   If FALSE, then this is an exit.
+ * @param cache
+ *   A structure for containing and caching relevant data.
+ */
+#ifndef _di_controller_entry_setting_validate_
+  extern void controller_entry_setting_validate(const controller_global_t global, const bool is_entry, controller_cache_t * const cache) F_attribute_visibility_internal_d;
+#endif // _di_controller_entry_setting_validate_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 25ef26e83e213d2e9870b7ef446516aba04dbb17..8284345ef134c7681e8ea2e62996ebbda4ff9edb 100644 (file)
@@ -34,6 +34,10 @@ extern "C" {
     }
     else if (*status != F_child) {
       *status = controller_entry_preprocess(*entry->global, F_true, cache);
+
+      if ((entry->global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && (entry->global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
+        controller_entry_setting_validate(*entry->global, F_true, cache);
+      }
     }
 
     if (F_status_is_error_not(*status) && *status != F_child) {
@@ -171,6 +175,10 @@ extern "C" {
     }
     else if (*status != F_child) {
       *status = controller_entry_preprocess(*entry->global, F_false, cache);
+
+      if ((entry->global->main->parameters.array[controller_parameter_simulate_e].result & f_console_result_found_e) && (entry->global->main->parameters.array[controller_parameter_validate_e].result & f_console_result_found_e)) {
+        controller_entry_setting_validate(*entry->global, F_false, cache);
+      }
     }
 
     if (F_status_is_error_not(*status) && *status != F_child && *status != F_file_found_not) {