summaryrefslogtreecommitdiff
path: root/recipes-support/uxfp/uxfp-from-source/0002-uxfp-add-param-syslog.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-support/uxfp/uxfp-from-source/0002-uxfp-add-param-syslog.patch')
-rw-r--r--recipes-support/uxfp/uxfp-from-source/0002-uxfp-add-param-syslog.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-support/uxfp/uxfp-from-source/0002-uxfp-add-param-syslog.patch b/recipes-support/uxfp/uxfp-from-source/0002-uxfp-add-param-syslog.patch
new file mode 100644
index 0000000..8dedc1b
--- /dev/null
+++ b/recipes-support/uxfp/uxfp-from-source/0002-uxfp-add-param-syslog.patch
@@ -0,0 +1,33 @@
+
+The patch allows to redirect all log messages from stdout to syslog.
+
+diff -ruN git/uxfp/main.c git/uxfp/main.c
+--- git/uxfp/main.c 2020-07-28 19:06:02.236397898 +0300
++++ git/uxfp/main.c 2020-07-28 17:55:38.000000000 +0300
+@@ -20,6 +20,7 @@
+ uint64_t speed;
+ bool debug;
+ bool recovery;
++ bool syslog;
+ } options = {0};
+
+ flag_t flags [] = {
+@@ -30,6 +31,7 @@
+ {"--class", "-c", VALUE_TYPE_ULONG, &options.class, OPT, "modem class"},
+ {"--debug", "-d", VALUE_TYPE_BOOLEAN, &options.debug, OPT, "enable debug logging"},
+ {"--lossrecovery", "-l", VALUE_TYPE_BOOLEAN, &options.recovery, OPT, "device in recovery mode"},
++ {"--syslog", "-n", VALUE_TYPE_BOOLEAN, &options.syslog, OPT, "all the logs redirected to syslog"},
+ {NULL, NULL, VALUE_TYPE_UNKNOWN, NULL, OPT, NULL},
+ };
+
+@@ -60,6 +62,10 @@
+ goto end;
+ }
+
++ if (options.syslog) {
++ core_log_set_native(true);
++ }
++
+ if (options.debug) {
+ core_log_set_level(LOG_LEVEL_DBG);
+ }