]> Kevux Git Server - controller/commitdiff
Update: Minimal changes to compile with the error printing changes in FLL.
authorKevin Day <Kevin@kevux.org>
Tue, 11 Nov 2025 03:23:59 +0000 (21:23 -0600)
committerKevin Day <Kevin@kevux.org>
Tue, 11 Nov 2025 03:23:59 +0000 (21:23 -0600)
This functionality originated here, but there will still need to be changes in the follow up commit.

data/build/stand_alone/config.h
sources/c/program/controller/main/print/debug/perform/pid.c
sources/c/program/controller/main/print/debug/perform/pid.h
sources/c/program/controller/main/print/error.c
sources/c/program/controller/main/print/error.h
sources/c/program/controller/main/print/error/entry.c
sources/c/program/controller/main/print/error/entry.h
sources/c/program/controller/main/print/error/perform/pid.c
sources/c/program/controller/main/print/error/perform/pid.h
sources/c/program/controller/main/print/error/rule.c
sources/c/program/controller/main/print/error/rule.h

index eec26fc59e41a10e0af7e99b642ebf3f184a77e2..4c111c2382a6184ac273f5d190765bcbc6c311c4 100644 (file)
 #define _di_f_string_format_Z_s_
 #define _di_f_string_format_Z_single_s_
 //#define _di_f_string_format_bracket_close_s_
-#define _di_f_string_format_bracket_open_s_
+//#define _di_f_string_format_bracket_open_s_
 #define _di_f_string_format_c_s_
 #define _di_f_string_format_d_double_s_
 #define _di_f_string_format_d_s_
 #define _di_f_string_format_s_double_s_
 #define _di_f_string_format_s_s_
 #define _di_f_string_format_s_single_s_
+#define _di_f_string_format_sentence_end_basic_s_
+#define _di_f_string_format_sentence_end_double_basic_s_
 #define _di_f_string_format_sentence_end_double_quote_s_
+#define _di_f_string_format_sentence_end_double_quote_basic_s_
 #define _di_f_string_format_sentence_end_double_s_
 //#define _di_f_string_format_sentence_end_quote_s_
 //#define _di_f_string_format_sentence_end_s_
+//#define _di_f_string_format_sentence_end_single_basic_s_
 //#define _di_f_string_format_sentence_end_single_quote_s_
+#define _di_f_string_format_sentence_end_single_quote_basic_s_
 //#define _di_f_string_format_sentence_end_single_s_
 #define _di_f_string_format_ss_double_s_
 #define _di_f_string_format_ss_single_s_
 //#define _di_fll_error_file_type_socket_s_
 #define _di_fll_error_parameter_integer_print_
 //#define _di_fll_error_print_
+#define _di_fll_error_print_debug_
 //#define _di_fll_error_s_a_
 //#define _di_fll_error_s_e_
 #define _di_fll_execute_arguments_add_
index 8ccff959334b8388b6ace93eedef229f04e16311..1bfce5545a805618bc0f66d4846d6912f93465df 100644 (file)
@@ -30,7 +30,7 @@ extern "C" {
 #endif // _di_controller_print_debug_perform_pid_file_control_socket_
 
 #ifndef _di_controller_print_debug_perform_pid_file_create_problem_
-  f_status_t controller_print_debug_perform_pid_file_create_problem(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t is_entry) {
+  f_status_t controller_print_debug_perform_pid_file_create_problem(fl_print_t * const print, const f_status_t status, const f_string_t debug, const uint8_t is_entry) {
 
     if (!print || !print->custom) return F_status_set_error(F_output_not);
     if (print->verbosity < f_console_verbosity_debug_e) return F_output_not;
@@ -45,7 +45,7 @@ extern "C" {
       fl_print_format("%[' could not be written because the destination is read only.%]%r", print->to, print->context, print->context, f_string_eol_s);
     }
     else {
-      controller_print_error_file_status(print, function, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
+      controller_print_error_file_status(print, debug, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
     }
 
     f_file_stream_lock(print->to);
index 455ee873868432e74abceb2223af88d24b09b331..df0d016dc9a6cfcf104a229e4429fbaea105e9ea 100644 (file)
@@ -48,8 +48,10 @@ extern "C" {
  * @param status
  *   The status code to process.
  *   Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param function
- *   The name of the function associated with the error.
+ * @param debug
+ *   (optional) The debug details, such as file, line number, and function.
+ *
+ *   Set to NULL to disable.
  * @param is_entry
  *   If TRUE, then this operates as an Entry.
  *   If FALSE, then this operates as an Exit.
index 1a2a28c659f888b3dbe7d344f617c8d90c427b0b..424a612c7a0e9ddd2304296d7436a3eb605f24f4 100644 (file)
@@ -5,7 +5,7 @@ extern "C" {
 #endif
 
 #ifndef _di_controller_print_error_
-  f_status_t controller_print_error(fl_print_t * const print, const f_string_t function) {
+  f_status_t controller_print_error(fl_print_t * const print, const f_string_t debug) {
 
     if (!print || !print->custom) return F_status_set_error(F_output_not);
     if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
@@ -14,7 +14,7 @@ extern "C" {
 
     f_thread_mutex_lock(&main->thread.lock.print.mutex);
 
-    fll_error_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e);
+    fll_error_print(print, F_status_set_fine(main->setting.state.status), debug, fll_error_file_flag_fallback_e);
 
     f_thread_mutex_unlock(&main->thread.lock.print.mutex);
 
@@ -41,7 +41,7 @@ extern "C" {
 #endif // _di_controller_print_error_failsafe_item_
 
 #ifndef _di_controller_print_error_file_
-  f_status_t controller_print_error_file(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
+  f_status_t controller_print_error_file(fl_print_t * const print, const f_string_t debug, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
 
     if (!print || !print->custom) return F_status_set_error(F_output_not);
     if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
@@ -50,7 +50,7 @@ extern "C" {
 
     f_thread_mutex_lock(&main->thread.lock.print.mutex);
 
-    fll_error_file_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e, name, operation, type);
+    fll_error_file_print(print, F_status_set_fine(main->setting.state.status), debug, fll_error_file_flag_fallback_e, name, operation, type);
 
     f_thread_mutex_unlock(&main->thread.lock.print.mutex);
 
@@ -59,7 +59,7 @@ extern "C" {
 #endif // _di_controller_print_error_file_
 
 #ifndef _di_controller_print_error_file_status_
-  f_status_t controller_print_error_file_status(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_status_t status) {
+  f_status_t controller_print_error_file_status(fl_print_t * const print, const f_string_t debug, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_status_t status) {
 
     if (!print || !print->custom) return F_status_set_error(F_output_not);
     if (print->verbosity == f_console_verbosity_quiet_e) return F_output_not;
@@ -68,7 +68,7 @@ extern "C" {
 
     f_thread_mutex_lock(&main->thread.lock.print.mutex);
 
-    fll_error_file_print(print, status, function, fll_error_file_flag_fallback_e, name, operation, type);
+    fll_error_file_print(print, status, debug, fll_error_file_flag_fallback_e, name, operation, type);
 
     f_thread_mutex_unlock(&main->thread.lock.print.mutex);
 
@@ -97,7 +97,7 @@ extern "C" {
 #endif // _di_controller_print_error_file_pid_exists_
 
 #ifndef _di_controller_print_error_status_
-  f_status_t controller_print_error_status(fl_print_t * const print, const f_string_t function, const f_status_t status) {
+  f_status_t controller_print_error_status(fl_print_t * const print, const f_string_t debug, const f_status_t status) {
 
     if (!print || !print->custom) return F_status_set_error(F_output_not);
     if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
@@ -106,7 +106,7 @@ extern "C" {
 
     f_thread_mutex_lock(&main->thread.lock.print.mutex);
 
-    fll_error_print(print, status, function, fll_error_file_flag_fallback_e);
+    fll_error_print(print, status, debug, fll_error_file_flag_fallback_e);
 
     f_thread_mutex_unlock(&main->thread.lock.print.mutex);
 
index 75d906fc5c5d969fa74c48b172b532ca99cfe89c..f99d6aa3f329068212ce2505bf4e2708b16a722d 100644 (file)
@@ -27,8 +27,10 @@ extern "C" {
  *   This does not alter print.custom.setting.state.status.
  *
  *   Must not be NULL.
- * @param function
- *   The name of the function associated with the error.
+ * @param debug
+ *   (optional) The debug details, such as file, line number, and function.
+ *
+ *   Set to NULL to disable.
  *
  * @return
  *   F_okay on success.
@@ -37,7 +39,7 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_controller_print_error_
-  extern f_status_t controller_print_error(fl_print_t * const print, const f_string_t function);
+  extern f_status_t controller_print_error(fl_print_t * const print, const f_string_t debug);
 #endif // _di_controller_print_error_
 
 /**
@@ -79,9 +81,10 @@ extern "C" {
  *   This does not alter print.custom.setting.state.status.
  *
  *   Must not be NULL.
- * @param function
- *   The name of the function where the error happened.
- *   Set to 0 to disable.
+ * @param debug
+ *   (optional) The debug details, such as file, line number, and function.
+ *
+ *   Set to NULL to disable.
  * @param name
  *   The name of the file or directory.
  * @param operation
@@ -96,7 +99,7 @@ extern "C" {
  *   F_output_not (with error bit) if a parameter is NULL.
  */
 #ifndef _di_controller_print_error_file_
-  extern f_status_t controller_print_error_file(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
+  extern f_status_t controller_print_error_file(fl_print_t * const print, const f_string_t debug, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
 #endif // _di_controller_print_error_file_
 
 /**
@@ -110,9 +113,10 @@ extern "C" {
  *   This does not alter print.custom.setting.state.status.
  *
  *   Must not be NULL.
- * @param function
- *   The name of the function where the error happened.
- *   Set to 0 to disable.
+ * @param debug
+ *   (optional) The debug details, such as file, line number, and function.
+ *
+ *   Set to NULL to disable.
  * @param name
  *   The name of the file or directory.
  * @param operation
@@ -129,7 +133,7 @@ extern "C" {
  *   F_output_not (with error bit) if a parameter is NULL.
  */
 #ifndef _di_controller_print_error_file_status_
-  extern f_status_t controller_print_error_file_status(fl_print_t * const print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_status_t status);
+  extern f_status_t controller_print_error_file_status(fl_print_t * const print, const f_string_t debug, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_status_t status);
 #endif // _di_controller_print_error_file_status_
 
 /**
@@ -143,8 +147,10 @@ extern "C" {
  *   This does not alter print.custom.setting.state.status.
  *
  *   Must not be NULL.
- * @param function
- *   The name of the function associated with the error.
+ * @param debug
+ *   (optional) The debug details, such as file, line number, and function.
+ *
+ *   Set to NULL to disable.
  * @param status
  *   The status code to print an error message about.
  *
@@ -155,7 +161,7 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_controller_print_error_status_
-  extern f_status_t controller_print_error_status(fl_print_t * const print, const f_string_t function, const f_status_t status);
+  extern f_status_t controller_print_error_status(fl_print_t * const print, const f_string_t debug, const f_status_t status);
 #endif // _di_controller_print_error_status_
 
 /**
index d6f519cd0211bfa970a86cf73628b93b5b6e80f8..212841015c776e5ca32df7c4fb6cf98818e24df9 100644 (file)
@@ -5,7 +5,7 @@ extern "C" {
 #endif
 
 #ifndef _di_controller_print_error_entry_
-  f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t function, const uint8_t fallback, const f_string_t line_file) {
+  f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t debug, const uint8_t fallback, const f_string_t line_file) {
 
     if (!print || !print->custom) return F_status_set_error(F_output_not);
     if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
@@ -15,7 +15,7 @@ extern "C" {
 
     f_thread_mutex_lock(&main->thread.lock.print.mutex);
 
-    fll_error_print(print, status, function, fallback);
+    fll_error_print(print, status, debug, fallback);
 
     f_file_stream_lock(print->to);
 
@@ -62,7 +62,7 @@ extern "C" {
 #endif // _di_controller_print_error_entry_cache_
 
 #ifndef _di_controller_print_error_entry_file_
-  f_status_t controller_print_error_entry_file(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t function, const uint8_t fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_string_t line_file) {
+  f_status_t controller_print_error_entry_file(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t debug, const uint8_t fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_string_t line_file) {
 
     if (!print || !print->custom) return F_status_set_error(F_output_not);
     if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
@@ -73,7 +73,7 @@ extern "C" {
     // fll_error_file_print() automatically locks, so manually handle only the mutex locking and flushing rather than calling controller_lock_print().
     f_thread_mutex_lock(&main->thread.lock.print.mutex);
 
-    fll_error_file_print(print, status, function, fallback, name, operation, type);
+    fll_error_file_print(print, status, debug, fallback, name, operation, type);
 
     f_file_stream_lock(print->to);
 
index 5ff7a99d61f8e66eee965dc86acd22592cc14a1d..9177fee2021f00e0d088c7b53ed1f41bb7d6e402 100644 (file)
@@ -33,9 +33,10 @@ extern "C" {
  * @param status
  *   The status code to process.
  *   Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param function
- *   (optional) The name of the function where the error happened.
- *   Set to 0 to disable.
+ * @param debug
+ *   (optional) The debug details, such as file, line number, and function.
+ *
+ *   Set to NULL to disable.
  * @param fallback
  *   Set to F_true to print the fallback error message for unknown errors.
  * @param thread
@@ -53,7 +54,7 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_controller_print_error_entry_
-  extern f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t function, const uint8_t fallback, const f_string_t line_file);
+  extern f_status_t controller_print_error_entry(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t debug, const uint8_t fallback, const f_string_t line_file);
 #endif // _di_controller_print_error_entry_
 
 /**
@@ -111,9 +112,10 @@ extern "C" {
  * @param status
  *   The status code to process.
  *   Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param function
- *   (optional) The name of the function where the error happened.
- *   Set to 0 to disable.
+ * @param debug
+ *   (optional) The debug details, such as file, line number, and function.
+ *
+ *   Set to NULL to disable.
  * @param fallback
  *   If TRUE, then print the fallback error message for unknown errors.
  *   If FALSE, then do not print the fallback error message.
@@ -136,7 +138,7 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_controller_print_error_entry_file_
-  extern f_status_t controller_print_error_entry_file(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t function, const uint8_t fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_string_t line_file);
+  extern f_status_t controller_print_error_entry_file(fl_print_t * const print, const uint8_t is_entry, const f_status_t status, const f_string_t debug, const uint8_t fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, const f_string_t line_file);
 #endif // _di_controller_print_error_entry_file_
 
 #ifdef __cplusplus
index 06c166a5451bfe681daa64da23b6d8e50555ffa2..4d4107775865931a64e71714a5c50ab31e57cdc2 100644 (file)
@@ -5,7 +5,7 @@ extern "C" {
 #endif
 
 #ifndef _di_controller_print_error_perform_pid_file_create_
-  f_status_t controller_print_error_perform_pid_file_create(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t is_entry, const f_string_t line_file) {
+  f_status_t controller_print_error_perform_pid_file_create(fl_print_t * const print, const f_status_t status, const f_string_t debug, const uint8_t is_entry, const f_string_t line_file) {
 
     if (!print || !print->custom) return F_status_set_error(F_output_not);
     if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
@@ -14,7 +14,7 @@ extern "C" {
 
     controller_lock_print(print->to, &main->thread);
 
-    controller_print_error_file_status(print, function, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
+    controller_print_error_file_status(print, debug, main->process.path_pid, f_file_operation_create_s, fll_error_file_type_file_e, status);
 
     f_file_stream_lock(print->to);
 
index 47eb99cff71463448b8870a98dd108135326d9b9..d5991524734e551a52299e78992b1f46a29cef3f 100644 (file)
@@ -30,8 +30,10 @@ extern "C" {
  * @param status
  *   The status code to process.
  *   Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param function
- *   The name of the function associated with the error.
+ * @param debug
+ *   (optional) The debug details, such as file, line number, and function.
+ *
+ *   Set to NULL to disable.
  * @param is_entry
  *   If TRUE, then this operates as an Entry.
  *   If FALSE, then this operates as an Exit.
@@ -48,7 +50,7 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_controller_print_error_perform_pid_file_create_
-  extern f_status_t controller_print_error_perform_pid_file_create(fl_print_t * const print, const f_status_t status, const f_string_t function, const uint8_t is_entry, const f_string_t line_file);
+  extern f_status_t controller_print_error_perform_pid_file_create(fl_print_t * const print, const f_status_t status, const f_string_t debug, const uint8_t is_entry, const f_string_t line_file);
 #endif // _di_controller_print_error_perform_pid_file_create_
 
 #ifdef __cplusplus
index fd9c29c08757ce9848eb93fbd8e69ceb0ea5d109..b38594bf66e7493073cbebcf3c9b1116f76e882d 100644 (file)
@@ -5,7 +5,7 @@ extern "C" {
 #endif
 
 #ifndef _di_controller_print_error_rule_
-  f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const action, const f_status_t status, const f_string_t function, const uint8_t fallback, const uint8_t item, const f_string_t line_file) {
+  f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const action, const f_status_t status, const f_string_t debug, const uint8_t fallback, const uint8_t item, const f_string_t line_file) {
 
     if (!print || !print->custom) return F_status_set_error(F_output_not);
     if (print->verbosity < f_console_verbosity_error_e) return F_output_not;
@@ -15,7 +15,7 @@ extern "C" {
 
     f_thread_mutex_lock(&main->thread.lock.print.mutex);
 
-    fll_error_print(print, status, function, fallback);
+    fll_error_print(print, status, debug, fallback);
 
     f_file_stream_lock(print->to);
 
index 92370f8b3f094acba9db3c0eed4a0d44f4bc0609..3427c1abe699ca5e669963e6dfbbe1be9eeb38bc 100644 (file)
@@ -36,9 +36,10 @@ extern "C" {
  * @param status
  *   The status code to process.
  *   Make sure this has F_status_set_fine() called if the status code has any error or warning bits.
- * @param function
- *   The name of the function where the error happened.
- *   Set to 0 to disable.
+ * @param debug
+ *   (optional) The debug details, such as file, line number, and function.
+ *
+ *   Set to NULL to disable.
  * @param fallback
  *   Set to F_true to print the fallback error message for unknown errors.
  * @param item
@@ -57,7 +58,7 @@ extern "C" {
  *   F_output_not (with error bit) if setting is NULL.
  */
 #ifndef _di_controller_print_error_rule_
-  extern f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const action, const f_status_t status, const f_string_t function, const uint8_t fallback, const uint8_t item, const f_string_t line_file);
+  extern f_status_t controller_print_error_rule(fl_print_t * const print, controller_cache_action_t * const action, const f_status_t status, const f_string_t debug, const uint8_t fallback, const uint8_t item, const f_string_t line_file);
 #endif // _di_controller_print_error_rule_
 
 /**