From 7448334824da433294b7910f292fd7d2f778262a Mon Sep 17 00:00:00 2001 From: nirenjan Date: Sun, 7 Nov 2021 16:06:49 -0800 Subject: [PATCH] Add `config apply` command --- daemon/x52d_command.c | 10 ++++++++++ po/libx52.pot | 6 +++--- po/xx_PL.po | 6 +++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/daemon/x52d_command.c b/daemon/x52d_command.c index fb5962b..61e0488 100644 --- a/daemon/x52d_command.c +++ b/daemon/x52d_command.c @@ -292,6 +292,16 @@ static void cmd_config(char *buffer, int *buflen, int argc, char **argv) return; } + MATCH(1, "apply") { + if (argc == 2) { + x52d_config_apply(); + OK("config", "apply"); + } else { + ERR_fmt("Unexpected arguments for 'config apply' command; got %d, expected 2", argc); + } + return; + } + ERR_fmt("Unknown subcommand '%s' for 'config' command", argv[1]); } diff --git a/po/libx52.pot b/po/libx52.pot index 03daa8b..575f08f 100644 --- a/po/libx52.pot +++ b/po/libx52.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: libx52 0.2.3\n" "Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n" -"POT-Creation-Date: 2021-11-07 06:24-0800\n" +"POT-Creation-Date: 2021-11-07 16:01-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -678,12 +678,12 @@ msgstr "" msgid "Timed out when polling for command" msgstr "" -#: daemon/x52d_command.c:354 +#: daemon/x52d_command.c:364 #, c-format msgid "Error reading from client %d: %s" msgstr "" -#: daemon/x52d_command.c:365 +#: daemon/x52d_command.c:375 #, c-format msgid "Short write to client %d; expected %d bytes, wrote %d bytes" msgstr "" diff --git a/po/xx_PL.po b/po/xx_PL.po index f8a329b..dd32087 100644 --- a/po/xx_PL.po +++ b/po/xx_PL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libx52 0.2.3\n" "Report-Msgid-Bugs-To: https://github.com/nirenjan/libx52/issues\n" -"POT-Creation-Date: 2021-11-07 06:24-0800\n" +"POT-Creation-Date: 2021-11-07 16:01-0800\n" "PO-Revision-Date: 2021-11-04 15:35-0700\n" "Last-Translator: Nirenjan Krishnan \n" "Language-Team: Dummy Language for testing i18n\n" @@ -729,12 +729,12 @@ msgstr "Erroray enwhay ollingpay orfay ommandcay: %s" msgid "Timed out when polling for command" msgstr "Imedtay outay enwhay ollingpay orfay ommandcay" -#: daemon/x52d_command.c:354 +#: daemon/x52d_command.c:364 #, c-format msgid "Error reading from client %d: %s" msgstr "Erroray eadingray omfray ientclay %d: %s" -#: daemon/x52d_command.c:365 +#: daemon/x52d_command.c:375 #, c-format msgid "Short write to client %d; expected %d bytes, wrote %d bytes" msgstr ""