summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-10-09 17:34:23 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2019-10-15 22:06:24 +0200
commit6bd476632311503105e0ce33bf1288b3a4ba919f (patch)
tree12b2665a611035bdbf15e4517266548096f60967
parentf70fadd762330d81cea1741ce15e567193ed791a (diff)
Rename cynagoradm to cynagoracli
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/main-cynagoracli.c (renamed from src/main-cynagoradm.c)12
2 files changed, 10 insertions, 10 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b69c15f..bde17f6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -101,10 +101,10 @@ install(TARGETS cynagorad
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
###########################################
-# build and install cynagoradm
+# build and install cynagoracli
###########################################
-add_executable(cynagoradm main-cynagoradm.c expire.c)
-target_link_libraries(cynagoradm cynagora)
-install(TARGETS cynagoradm
+add_executable(cynagoracli main-cynagoracli.c expire.c)
+target_link_libraries(cynagoracli cynagora)
+install(TARGETS cynagoracli
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
diff --git a/src/main-cynagoradm.c b/src/main-cynagoracli.c
index b668abb..db36243 100644
--- a/src/main-cynagoradm.c
+++ b/src/main-cynagoracli.c
@@ -65,7 +65,7 @@ static
const char
helptxt[] =
"\n"
- "usage: cynadm [options]... [action [arguments]]\n"
+ "usage: cynagoracli [options]... [action [arguments]]\n"
"\n"
"otpions:\n"
" -s, --socket xxx set the base xxx for sockets\n"
@@ -75,16 +75,16 @@ helptxt[] =
" -h, --help print this help and exit\n"
" -v, --version print the version and exit\n"
"\n"
- "When action is given, cynadm performs the action and exits.\n"
- "Otherwise cynadm continuously read its input to get the actions.\n"
- "For a list of actions tpe 'cynadm help'.\n"
+ "When action is given, cynagoracli performs the action and exits.\n"
+ "Otherwise cynagoracli continuously read its input to get the actions.\n"
+ "For a list of actions type 'cynagoracli help'.\n"
"\n"
;
static
const char
versiontxt[] =
- "cynadm version 1.99.99\n"
+ "cynagoracli version 1.99.99\n"
;
static
@@ -789,7 +789,7 @@ int main(int ac, char **av)
for(;;) {
rc = poll(fds, 2, -1);
if (fds[0].revents & POLLIN) {
- rc = (int)read(0, buffer, sizeof buffer - bufill);
+ rc = (int)read(0, &buffer[bufill], sizeof buffer - bufill);
if (rc == 0)
break;
if (rc > 0) {