[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-mdb] 01/02: rename qr-show command
From: |
gnunet |
Subject: |
[taler-taler-mdb] 01/02: rename qr-show command |
Date: |
Sun, 04 Aug 2024 21:41:01 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository taler-mdb.
commit 1fb1de725b9c2bd8ad03949eb5d5b222231c7c47
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Aug 4 21:34:02 2024 +0200
rename qr-show command
---
debian/taler-mdb.install | 2 +-
src/Makefile.am | 6 ++--
src/{qr-show.c => taler-mdb-qr-show.c} | 59 +++++++++++++++++++---------------
3 files changed, 37 insertions(+), 30 deletions(-)
diff --git a/debian/taler-mdb.install b/debian/taler-mdb.install
index f5e762f..532c58b 100644
--- a/debian/taler-mdb.install
+++ b/debian/taler-mdb.install
@@ -1,7 +1,7 @@
debian/etc/* etc/
usr/bin/taler-mdb
usr/bin/taler-mdb-display
-usr/bin/qr-show
+usr/bin/taler-mdb-qr-show
usr/bin/taler-mdb-ads.sh
usr/bin/taler-mdb-show.sh
usr/bin/taler-mdb-network-check.sh
diff --git a/src/Makefile.am b/src/Makefile.am
index 5e3d644..c47028c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,7 +4,7 @@ bin_PROGRAMS = \
taler-mdb-display
if HAVE_QR
-bin_PROGRAMS += qr-show
+bin_PROGRAMS += taler-mdb-qr-show
endif
if USE_COVERAGE
@@ -28,8 +28,8 @@ taler_mdb_LDADD = \
$(XLIB)
-qr_show_SOURCES = \
- qr-show.c
+taler_mdb_qr_show_SOURCES = \
+ taler-mdb-qr-show.c
qr_show_LDADD = \
-lgnunetutil \
@QR_LIBS@ \
diff --git a/src/qr-show.c b/src/taler-mdb-qr-show.c
similarity index 88%
rename from src/qr-show.c
rename to src/taler-mdb-qr-show.c
index d320865..5cebf5d 100644
--- a/src/qr-show.c
+++ b/src/taler-mdb-qr-show.c
@@ -17,7 +17,7 @@ along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
-* @file qr-show.c
+* @file taler-mdb-qr-show.c
* @brief shows a QR code on the display for a defined amount of time
* @author Boss Marco
* @author Christian Grothoff
@@ -241,7 +241,8 @@ shutdown_task (void *cls)
if (NULL != qrDisplay.memory)
memset (qrDisplay.memory,
0xFF,
- qrDisplay.var_info.xres * qrDisplay.var_info.yres
+ qrDisplay.var_info.xres
+ * qrDisplay.var_info.yres
* sizeof (uint16_t));
if (0 < qrDisplay.backlightfd)
(void) ! write (qrDisplay.backlightfd,
@@ -292,10 +293,11 @@ run (void *cls,
return;
arg_next = args + 1;
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (cfg,
- "taler-mdb",
- "FRAMEBUFFER_DEVICE",
- &framebuffer_device_filename))
+ GNUNET_CONFIGURATION_get_value_filename (
+ cfg,
+ "taler-mdb",
+ "FRAMEBUFFER_DEVICE",
+ &framebuffer_device_filename))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"taler-mdb",
@@ -303,14 +305,16 @@ run (void *cls,
framebuffer_device_filename = GNUNET_strdup ("/dev/fb1");
}
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (cfg,
- "taler-mdb",
- "FRAMEBUFFER_BACKLIGHT",
-
&framebuffer_backlight_filename))
+ GNUNET_CONFIGURATION_get_value_filename (
+ cfg,
+ "taler-mdb",
+ "FRAMEBUFFER_BACKLIGHT",
+ &framebuffer_backlight_filename))
{
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "taler-mdb",
- "FRAMEBUFFER_BACKLIGHT");
+ GNUNET_log_config_missing (
+ GNUNET_ERROR_TYPE_ERROR,
+ "taler-mdb",
+ "FRAMEBUFFER_BACKLIGHT");
framebuffer_backlight_filename = GNUNET_strdup (
"/sys/class/backlight/soc:backlight/brightness");
}
@@ -352,11 +356,12 @@ run (void *cls,
}
/* get pointer onto frame buffer */
- qrDisplay.memory = mmap (NULL,
- qrDisplay.fix_info.smem_len,
- PROT_READ | PROT_WRITE, MAP_SHARED,
- qrDisplay.devicefd,
- 0);
+ qrDisplay.memory
+ = mmap (NULL,
+ qrDisplay.fix_info.smem_len,
+ PROT_READ | PROT_WRITE, MAP_SHARED,
+ qrDisplay.devicefd,
+ 0);
/* open backlight file to turn display backlight on and off */
if (0 > qrDisplay.devicefd)
@@ -375,9 +380,10 @@ run (void *cls,
framebuffer_backlight_filename, O_WRONLY);
if (0 > qrDisplay.backlightfd)
{
- GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
- "open",
- framebuffer_backlight_filename);
+ GNUNET_log_strerror_file (
+ GNUNET_ERROR_TYPE_WARNING,
+ "open",
+ framebuffer_backlight_filename);
}
else
{
@@ -393,9 +399,10 @@ run (void *cls,
}
else
{
- GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
- "open",
- framebuffer_device_filename);
+ GNUNET_log_strerror_file (
+ GNUNET_ERROR_TYPE_WARNING,
+ "open",
+ framebuffer_device_filename);
}
GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
NULL);
@@ -416,7 +423,7 @@ main (int argc,
GNUNET_GETOPT_option_relative_time ('d',
"delay",
"DELAY",
- "how long should we display the text
before continuing",
+ "how long should we display the QR
code before exiting",
&delay),
GNUNET_GETOPT_option_flag ('i',
"backlight-invert",
@@ -427,7 +434,7 @@ main (int argc,
ret = GNUNET_PROGRAM_run (argc,
argv,
- "qr-show",
+ "taler-mdb-qr-show",
"This is an application to show a QR code for a
defined period of time before starting another program.\n",
options,
&run,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.