Make X52 daemon listen on a Unix socket

This change makes X52 daemon listen on a Unix socket. This is in
preparation for changes that will read from the socket and allow clients
to communicate with and control the daemon.
reverse-scroll
nirenjan 2021-11-04 13:48:18 -07:00
parent abc74d6e37
commit 5a78492140
9 changed files with 274 additions and 57 deletions

View File

@ -14,7 +14,8 @@ x52d_SOURCES = \
daemon/x52d_device.c \ daemon/x52d_device.c \
daemon/x52d_clock.c \ daemon/x52d_clock.c \
daemon/x52d_mouse.c \ daemon/x52d_mouse.c \
daemon/x52d_led.c daemon/x52d_led.c \
daemon/x52d_comm_internal.c
x52d_CFLAGS = \ x52d_CFLAGS = \
-I $(top_srcdir) \ -I $(top_srcdir) \
@ -50,7 +51,8 @@ lib_LTLIBRARIES += libx52dcomm.la
# Client library to communicate with X52 daemon # Client library to communicate with X52 daemon
libx52dcomm_la_SOURCES = \ libx52dcomm_la_SOURCES = \
daemon/x52d_comm_client.c daemon/x52d_comm_client.c \
daemon/x52d_comm_internal.c
libx52dcomm_la_CFLAGS = \ libx52dcomm_la_CFLAGS = \
-I $(top_srcdir) \ -I $(top_srcdir) \
-DSYSCONFDIR=\"$(sysconfdir)\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \
@ -87,6 +89,7 @@ EXTRA_DIST += \
daemon/x52d_io.h \ daemon/x52d_io.h \
daemon/x52d_mouse.h \ daemon/x52d_mouse.h \
daemon/x52dcomm.h \ daemon/x52dcomm.h \
daemon/x52dcomm-internal.h \
daemon/x52d.conf daemon/x52d.conf
if HAVE_SYSTEMD if HAVE_SYSTEMD

View File

@ -16,23 +16,18 @@
#include <unistd.h> #include <unistd.h>
#include "x52dcomm.h" #include "x52dcomm.h"
#include "x52d_const.h" #include "x52dcomm-internal.h"
int x52d_dial_command(const char *sock_path) int x52d_dial_command(const char *sock_path)
{ {
int sock; int sock;
socklen_t len; int len;
struct sockaddr_un remote; struct sockaddr_un remote;
int saved_errno; int saved_errno;
if (sock_path == NULL) { len = x52d_setup_command_sock(sock_path, &remote);
sock_path = X52D_SOCK_COMMAND; if (len < 0) {
} /* Error when setting up sockaddr */
len = strlen(sock_path);
if (len >= sizeof(remote.sun_path)) {
/* Socket path will not fit inside sun_path */
errno = E2BIG;
return -1; return -1;
} }
@ -43,15 +38,8 @@ int x52d_dial_command(const char *sock_path)
return -1; return -1;
} }
/* Setup the sockaddr structure */
memset(&remote, 0, sizeof(remote));
remote.sun_family = AF_UNIX;
/* We've already verified that sock_path will fit, so we don't need strncpy */
strcpy(remote.sun_path, sock_path);
len += sizeof(remote.sun_family);
/* Connect to the socket */ /* Connect to the socket */
if (connect(sock, (struct sockaddr *)&remote, len) == -1) { if (connect(sock, (struct sockaddr *)&remote, (socklen_t)len) == -1) {
/* Failure connecting to the socket. Cleanup */ /* Failure connecting to the socket. Cleanup */
saved_errno = errno; saved_errno = errno;
/* close may modify errno, so we save it prior to the call */ /* close may modify errno, so we save it prior to the call */

View File

@ -0,0 +1,51 @@
/*
* Saitek X52 Pro MFD & LED driver - Client communication library
*
* Copyright (C) 2021 Nirenjan Krishnan (nirenjan@nirenjan.org)
*
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
*/
#include "config.h"
#include <errno.h>
#include <string.h>
#include "x52dcomm-internal.h"
#include "x52d_const.h"
const char * x52d_command_sock_path(const char *sock_path)
{
if (sock_path == NULL) {
sock_path = X52D_SOCK_COMMAND;
}
return sock_path;
}
int x52d_setup_command_sock(const char *sock_path, struct sockaddr_un *remote)
{
int len;
if (remote == NULL) {
errno = EINVAL;
return -1;
}
sock_path = x52d_command_sock_path(sock_path);
len = strlen(sock_path);
if ((size_t)len >= sizeof(remote->sun_path)) {
/* Socket path will not fit inside sun_path */
errno = E2BIG;
return -1;
}
/* Setup the sockaddr structure */
memset(remote, 0, sizeof(*remote));
remote->sun_family = AF_UNIX;
/* We've already verified that sock_path will fit, so we don't need strncpy */
strcpy(remote->sun_path, sock_path);
len += sizeof(remote->sun_family);
return len;
}

View File

@ -23,4 +23,6 @@
#define N_(x) gettext_noop(x) #define N_(x) gettext_noop(x)
#define _(x) gettext(x) #define _(x) gettext(x)
#define X52D_MAX_CLIENTS 63
#endif // !defined X52D_CONST_H #endif // !defined X52D_CONST_H

View File

@ -14,6 +14,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <signal.h> #include <signal.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h>
#include <errno.h> #include <errno.h>
#include "x52d_clock.h" #include "x52d_clock.h"
@ -22,6 +23,8 @@
#include "x52d_device.h" #include "x52d_device.h"
#include "x52d_io.h" #include "x52d_io.h"
#include "x52d_mouse.h" #include "x52d_mouse.h"
#include "x52dcomm-internal.h"
#include "x52dcomm.h"
#include "pinelog.h" #include "pinelog.h"
static volatile int flag_quit; static volatile int flag_quit;
@ -86,7 +89,8 @@ static void usage(int exit_code)
fprintf(stderr, fprintf(stderr,
_("Usage: %s [-f] [-v] [-q]\n" _("Usage: %s [-f] [-v] [-q]\n"
"\t[-l log-file] [-o override]\n" "\t[-l log-file] [-o override]\n"
"\t[-c config-file] [-p pid-file]\n"), "\t[-c config-file] [-p pid-file]\n"
"\t[-s command-socket-path]\n"),
X52D_APP_NAME); X52D_APP_NAME);
exit(exit_code); exit(exit_code);
} }
@ -194,6 +198,59 @@ static void start_daemon(bool foreground, const char *pid_file)
} }
} }
/* Bind and listen to the command socket */
static int listen_command(const char *command_sock)
{
int sock_fd;
int len;
struct sockaddr_un local;
int flags;
len = x52d_setup_command_sock(command_sock, &local);
if (len < 0) {
return -1;
}
sock_fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (sock_fd < 0) {
/* Failure creating the socket. Abort early */
PINELOG_ERROR(_("Error creating command socket: %s"), strerror(errno));
return -1;
}
/* Mark the socket as non-blocking */
flags = fcntl(sock_fd, F_GETFL);
if (flags < 0) {
PINELOG_ERROR(_("Error getting command socket flags: %s"), strerror(errno));
goto sock_failure;
}
if (fcntl(sock_fd, F_SETFL, flags | O_NONBLOCK) < 0) {
PINELOG_ERROR(_("Error setting command socket flags: %s"), strerror(errno));
goto sock_failure;
}
/* Cleanup any existing socket */
unlink(local.sun_path);
if (bind(sock_fd, (struct sockaddr *)&local, (socklen_t)len) < 0) {
/* Failure binding socket */
PINELOG_ERROR(_("Error binding to command socket: %s"), strerror(errno));
goto listen_failure;
}
if (listen(sock_fd, X52D_MAX_CLIENTS) < 0) {
PINELOG_ERROR(_("Error listening on command socket: %s"), strerror(errno));
goto listen_failure;
}
return sock_fd;
listen_failure:
unlink(local.sun_path);
sock_failure:
close(sock_fd);
return -1;
}
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
int verbosity = 0; int verbosity = 0;
@ -202,7 +259,9 @@ int main(int argc, char **argv)
char *log_file = NULL; char *log_file = NULL;
char *conf_file = NULL; char *conf_file = NULL;
const char *pid_file = NULL; const char *pid_file = NULL;
const char *command_sock = NULL;
int opt; int opt;
int command_sock_fd;
/* Initialize gettext */ /* Initialize gettext */
#if ENABLE_NLS #if ENABLE_NLS
@ -224,8 +283,9 @@ int main(int argc, char **argv)
* -q silent behavior * -q silent behavior
* -l path to log file * -l path to log file
* -p path to PID file (only used if running in background) * -p path to PID file (only used if running in background)
* -s path to command socket
*/ */
while ((opt = getopt(argc, argv, "fvql:o:c:p:h")) != -1) { while ((opt = getopt(argc, argv, "fvql:o:c:p:s:h")) != -1) {
switch (opt) { switch (opt) {
case 'f': case 'f':
foreground = true; foreground = true;
@ -266,6 +326,10 @@ int main(int argc, char **argv)
pid_file = optarg; pid_file = optarg;
break; break;
case 's':
command_sock = optarg;
break;
case 'h': case 'h':
usage(EXIT_SUCCESS); usage(EXIT_SUCCESS);
break; break;
@ -281,6 +345,8 @@ int main(int argc, char **argv)
PINELOG_DEBUG(_("Verbosity = %d"), verbosity); PINELOG_DEBUG(_("Verbosity = %d"), verbosity);
PINELOG_DEBUG(_("Log file = %s"), log_file); PINELOG_DEBUG(_("Log file = %s"), log_file);
PINELOG_DEBUG(_("Config file = %s"), conf_file); PINELOG_DEBUG(_("Config file = %s"), conf_file);
PINELOG_DEBUG(_("PID file = %s"), pid_file);
PINELOG_DEBUG(_("Command socket = %s"), command_sock);
start_daemon(foreground, pid_file); start_daemon(foreground, pid_file);
@ -295,6 +361,11 @@ int main(int argc, char **argv)
x52d_mouse_evdev_init(); x52d_mouse_evdev_init();
#endif #endif
command_sock_fd = listen_command(command_sock);
if (command_sock_fd < 0) {
goto cleanup;
}
// Apply configuration // Apply configuration
x52d_config_apply(); x52d_config_apply();
@ -321,6 +392,7 @@ int main(int argc, char **argv)
PINELOG_INFO(_("Received termination signal %s"), strsignal(flag_quit)); PINELOG_INFO(_("Received termination signal %s"), strsignal(flag_quit));
cleanup:
// Stop device threads // Stop device threads
x52d_clock_exit(); x52d_clock_exit();
x52d_dev_exit(); x52d_dev_exit();
@ -329,6 +401,14 @@ int main(int argc, char **argv)
x52d_io_exit(); x52d_io_exit();
#endif #endif
// Close the socket and remove the socket file
if (command_sock_fd >= 0) {
command_sock = x52d_command_sock_path(command_sock);
PINELOG_TRACE("Closing command socket %s", command_sock);
close(command_sock_fd);
unlink(command_sock);
}
// Remove the PID file // Remove the PID file
PINELOG_TRACE("Removing PID file %s", pid_file); PINELOG_TRACE("Removing PID file %s", pid_file);
unlink(pid_file); unlink(pid_file);

View File

@ -0,0 +1,19 @@
/*
* Saitek X52 Pro MFD & LED driver - communication library interal functions
*
* Copyright (C) 2021 Nirenjan Krishnan (nirenjan@nirenjan.org)
*
* SPDX-License-Identifier: GPL-2.0-only WITH Classpath-exception-2.0
*/
#ifndef X52DCOMM_INTERNAL_H
#define X52DCOMM_INTERNAL_H
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
const char *x52d_command_sock_path(const char *sock_path);
int x52d_setup_command_sock(const char *sock_path, struct sockaddr_un *remote);
#endif // !defined X52DCOMM_INTERNAL_H

View File

@ -88,3 +88,4 @@ int x52d_send_command(int sock_fd, char *buffer, size_t buflen);
#endif #endif
#endif // !defined X52DCOMM_H #endif // !defined X52DCOMM_H

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libx52 0.2.3\n" "Project-Id-Version: libx52 0.2.3\n"
"Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n" "Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n"
"POT-Creation-Date: 2021-11-04 10:50-0700\n" "POT-Creation-Date: 2021-11-04 13:37-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -491,81 +491,117 @@ msgstr ""
msgid "OK" msgid "OK"
msgstr "" msgstr ""
#: daemon/x52d_main.c:60 #: daemon/x52d_main.c:63
#, c-format #, c-format
msgid "Error %d setting log file: %s\n" msgid "Error %d setting log file: %s\n"
msgstr "" msgstr ""
#: daemon/x52d_main.c:76 #: daemon/x52d_main.c:79
#, c-format #, c-format
msgid "Error %d installing handler for signal %d: %s" msgid "Error %d installing handler for signal %d: %s"
msgstr "" msgstr ""
#: daemon/x52d_main.c:87 #: daemon/x52d_main.c:90
#, c-format #, c-format
msgid "" msgid ""
"Usage: %s [-f] [-v] [-q]\n" "Usage: %s [-f] [-v] [-q]\n"
"\t[-l log-file] [-o override]\n" "\t[-l log-file] [-o override]\n"
"\t[-c config-file] [-p pid-file]\n" "\t[-c config-file] [-p pid-file]\n"
"\t[-s command-socket-path]\n"
msgstr "" msgstr ""
#: daemon/x52d_main.c:117 #: daemon/x52d_main.c:121
#, c-format #, c-format
msgid "Daemon is already running as PID %u" msgid "Daemon is already running as PID %u"
msgstr "" msgstr ""
#: daemon/x52d_main.c:255 #: daemon/x52d_main.c:217
#, c-format
msgid "Error creating command socket: %s"
msgstr ""
#: daemon/x52d_main.c:224
#, c-format
msgid "Error getting command socket flags: %s"
msgstr ""
#: daemon/x52d_main.c:228
#, c-format
msgid "Error setting command socket flags: %s"
msgstr ""
#: daemon/x52d_main.c:236
#, c-format
msgid "Error binding to command socket: %s"
msgstr ""
#: daemon/x52d_main.c:241
#, c-format
msgid "Error listening on command socket: %s"
msgstr ""
#: daemon/x52d_main.c:315
#, c-format #, c-format
msgid "Unable to parse configuration override '%s'\n" msgid "Unable to parse configuration override '%s'\n"
msgstr "" msgstr ""
#: daemon/x52d_main.c:279 #: daemon/x52d_main.c:343
#, c-format #, c-format
msgid "Foreground = %s" msgid "Foreground = %s"
msgstr "" msgstr ""
#: daemon/x52d_main.c:279 daemon/x52d_main.c:280 #: daemon/x52d_main.c:343 daemon/x52d_main.c:344
msgid "true" msgid "true"
msgstr "" msgstr ""
#: daemon/x52d_main.c:279 daemon/x52d_main.c:280 #: daemon/x52d_main.c:343 daemon/x52d_main.c:344
msgid "false" msgid "false"
msgstr "" msgstr ""
#: daemon/x52d_main.c:280 #: daemon/x52d_main.c:344
#, c-format #, c-format
msgid "Quiet = %s" msgid "Quiet = %s"
msgstr "" msgstr ""
#: daemon/x52d_main.c:281 #: daemon/x52d_main.c:345
#, c-format #, c-format
msgid "Verbosity = %d" msgid "Verbosity = %d"
msgstr "" msgstr ""
#: daemon/x52d_main.c:282 #: daemon/x52d_main.c:346
#, c-format #, c-format
msgid "Log file = %s" msgid "Log file = %s"
msgstr "" msgstr ""
#: daemon/x52d_main.c:283 #: daemon/x52d_main.c:347
#, c-format #, c-format
msgid "Config file = %s" msgid "Config file = %s"
msgstr "" msgstr ""
#: daemon/x52d_main.c:309 #: daemon/x52d_main.c:348
#, c-format
msgid "PID file = %s"
msgstr ""
#: daemon/x52d_main.c:349
#, c-format
msgid "Command socket = %s"
msgstr ""
#: daemon/x52d_main.c:380
msgid "Reloading X52 configuration" msgid "Reloading X52 configuration"
msgstr "" msgstr ""
#: daemon/x52d_main.c:316 #: daemon/x52d_main.c:387
msgid "Saving X52 configuration to disk" msgid "Saving X52 configuration to disk"
msgstr "" msgstr ""
#: daemon/x52d_main.c:322 #: daemon/x52d_main.c:393
#, c-format #, c-format
msgid "Received termination signal %s" msgid "Received termination signal %s"
msgstr "" msgstr ""
#: daemon/x52d_main.c:336 #: daemon/x52d_main.c:416
msgid "Shutting down X52 daemon" msgid "Shutting down X52 daemon"
msgstr "" msgstr ""

View File

@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libx52 0.2.3\n" "Project-Id-Version: libx52 0.2.3\n"
"Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n" "Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n"
"POT-Creation-Date: 2021-11-04 10:50-0700\n" "POT-Creation-Date: 2021-11-04 13:37-0700\n"
"PO-Revision-Date: 2021-11-04 10:52-0700\n" "PO-Revision-Date: 2021-11-04 13:45-0700\n"
"Last-Translator: Nirenjan Krishnan <nirenjan@gmail.com>\n" "Last-Translator: Nirenjan Krishnan <nirenjan@gmail.com>\n"
"Language-Team: Dummy Language for testing i18n\n" "Language-Team: Dummy Language for testing i18n\n"
"Language: xx_PL\n" "Language: xx_PL\n"
@ -534,84 +534,121 @@ msgstr "Estingtay aracterchay 0x%02x..."
msgid "OK" msgid "OK"
msgstr "OKay" msgstr "OKay"
#: daemon/x52d_main.c:60 #: daemon/x52d_main.c:63
#, c-format #, c-format
msgid "Error %d setting log file: %s\n" msgid "Error %d setting log file: %s\n"
msgstr "Erroray %d ettingsay oglay ilefay: %s\n" msgstr "Erroray %d ettingsay oglay ilefay: %s\n"
#: daemon/x52d_main.c:76 #: daemon/x52d_main.c:79
#, c-format #, c-format
msgid "Error %d installing handler for signal %d: %s" msgid "Error %d installing handler for signal %d: %s"
msgstr "Erroray %d installingay andlerhay orfay ignalsay %d: %s" msgstr "Erroray %d installingay andlerhay orfay ignalsay %d: %s"
#: daemon/x52d_main.c:87 #: daemon/x52d_main.c:90
#, c-format #, c-format
msgid "" msgid ""
"Usage: %s [-f] [-v] [-q]\n" "Usage: %s [-f] [-v] [-q]\n"
"\t[-l log-file] [-o override]\n" "\t[-l log-file] [-o override]\n"
"\t[-c config-file] [-p pid-file]\n" "\t[-c config-file] [-p pid-file]\n"
"\t[-s command-socket-path]\n"
msgstr "" msgstr ""
"Usageay: %s [-f] [-v] [-q]\n" "Usageay: %s [-f] [-v] [-q]\n"
"\t[-l oglay-ilefay] [-o overrideay]\n" "\t[-l oglay-ilefay] [-o overrideay]\n"
"\t[-c onfigcay-ilefay] [-p idpay-ilefay]\n" "\t[-c onfigcay-ilefay] [-p idpay-ilefay]\n"
"\t[-s ommandcay-ocketsay-athpay]\n"
#: daemon/x52d_main.c:117 #: daemon/x52d_main.c:121
#, c-format #, c-format
msgid "Daemon is already running as PID %u" msgid "Daemon is already running as PID %u"
msgstr "Aemonday isay alreadyay unningray asay IDPay %u" msgstr "Aemonday isay alreadyay unningray asay IDPay %u"
#: daemon/x52d_main.c:255 #: daemon/x52d_main.c:217
#, c-format
msgid "Error creating command socket: %s"
msgstr "Erroray eatingcray ommandcay ocketsay: %s"
#: daemon/x52d_main.c:224
#, c-format
msgid "Error getting command socket flags: %s"
msgstr "Erroray ettinggay ommandcay ocketsay agsflay: %s"
#: daemon/x52d_main.c:228
#, c-format
msgid "Error setting command socket flags: %s"
msgstr "Erroray ettingsay ommandcay ocketsay agsflay: %s"
#: daemon/x52d_main.c:236
#, c-format
msgid "Error binding to command socket: %s"
msgstr "Erroray indingbay otay ommandcay ocketsay: %s"
#: daemon/x52d_main.c:241
#, c-format
msgid "Error listening on command socket: %s"
msgstr "Erroray isteninglay onay ommandcay ocketsay: %s"
#: daemon/x52d_main.c:315
#, c-format #, c-format
msgid "Unable to parse configuration override '%s'\n" msgid "Unable to parse configuration override '%s'\n"
msgstr "Unableay otay arsepay onfigurationcay overrideay '%s'\n" msgstr "Unableay otay arsepay onfigurationcay overrideay '%s'\n"
#: daemon/x52d_main.c:279 #: daemon/x52d_main.c:343
#, c-format #, c-format
msgid "Foreground = %s" msgid "Foreground = %s"
msgstr "Oregroundfay = %s" msgstr "Oregroundfay = %s"
#: daemon/x52d_main.c:279 daemon/x52d_main.c:280 #: daemon/x52d_main.c:343 daemon/x52d_main.c:344
msgid "true" msgid "true"
msgstr "uetray" msgstr "uetray"
#: daemon/x52d_main.c:279 daemon/x52d_main.c:280 #: daemon/x52d_main.c:343 daemon/x52d_main.c:344
msgid "false" msgid "false"
msgstr "alsefay" msgstr "alsefay"
#: daemon/x52d_main.c:280 #: daemon/x52d_main.c:344
#, c-format #, c-format
msgid "Quiet = %s" msgid "Quiet = %s"
msgstr "Uietqay = %s" msgstr "Uietqay = %s"
#: daemon/x52d_main.c:281 #: daemon/x52d_main.c:345
#, c-format #, c-format
msgid "Verbosity = %d" msgid "Verbosity = %d"
msgstr "Erbosityvay = %d" msgstr "Erbosityvay = %d"
#: daemon/x52d_main.c:282 #: daemon/x52d_main.c:346
#, c-format #, c-format
msgid "Log file = %s" msgid "Log file = %s"
msgstr "Oglay ilefay = %s" msgstr "Oglay ilefay = %s"
#: daemon/x52d_main.c:283 #: daemon/x52d_main.c:347
#, c-format #, c-format
msgid "Config file = %s" msgid "Config file = %s"
msgstr "Onfigcay ilefay = %s" msgstr "Onfigcay ilefay = %s"
#: daemon/x52d_main.c:309 #: daemon/x52d_main.c:348
#, c-format
msgid "PID file = %s"
msgstr "IDPay ilefay = %s"
#: daemon/x52d_main.c:349
#, c-format
msgid "Command socket = %s"
msgstr "Ommandcay ocketsay = %s"
#: daemon/x52d_main.c:380
msgid "Reloading X52 configuration" msgid "Reloading X52 configuration"
msgstr "Eloadingray X52 onfigurationcay" msgstr "Eloadingray X52 onfigurationcay"
#: daemon/x52d_main.c:316 #: daemon/x52d_main.c:387
msgid "Saving X52 configuration to disk" msgid "Saving X52 configuration to disk"
msgstr "Avingsay X52 onfigurationcay otay iskday" msgstr "Avingsay X52 onfigurationcay otay iskday"
#: daemon/x52d_main.c:322 #: daemon/x52d_main.c:393
#, c-format #, c-format
msgid "Received termination signal %s" msgid "Received termination signal %s"
msgstr "Eceivedray erminationtay ignalsay %s" msgstr "Eceivedray erminationtay ignalsay %s"
#: daemon/x52d_main.c:336 #: daemon/x52d_main.c:416
msgid "Shutting down X52 daemon" msgid "Shutting down X52 daemon"
msgstr "Uttingshay ownday X52 aemonday" msgstr "Uttingshay ownday X52 aemonday"