summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/cmd_botu.c2
-rw-r--r--cmd/cmd_cmd.c2
-rw-r--r--cmd/cmd_cookie.c2
-rw-r--r--cmd/cmd_date.c2
-rw-r--r--cmd/cmd_fir.c2
-rw-r--r--cmd/cmd_fir1p.c2
-rw-r--r--cmd/cmd_loadavg.c2
-rw-r--r--cmd/cmd_rand_libc.c2
-rw-r--r--cmd/cmd_rusage.c2
-rw-r--r--cmd/cmd_sha1.c2
-rw-r--r--cmd/cmd_spi.c8
-rw-r--r--cmd/cmd_uptime.c2
-rw-r--r--cmd/cmd_version.c2
13 files changed, 16 insertions, 16 deletions
diff --git a/cmd/cmd_botu.c b/cmd/cmd_botu.c
index d5a9e4e..ac9eb1a 100644
--- a/cmd/cmd_botu.c
+++ b/cmd/cmd_botu.c
@@ -35,7 +35,7 @@ void *cmd_botu(void *data)
proc_sec = start.tv_sec - file_stat.st_ctim.tv_sec;
- snprintf(buf, buf_size, "%lud %luh %lum %lus\n",
+ snprintf(buf, buf_size, "%lud %luh %lum %lus",
(proc_sec/(3600*24)),
(proc_sec/(3600))%24,
(proc_sec/60)%60,
diff --git a/cmd/cmd_cmd.c b/cmd/cmd_cmd.c
index 0eabfe1..66ef570 100644
--- a/cmd/cmd_cmd.c
+++ b/cmd/cmd_cmd.c
@@ -10,7 +10,7 @@ void *cmd_cmd(void *data)
printf("CMD\n");
- snprintf(buf, buf_size, "%s\n", param);
+ snprintf(buf, buf_size, "%s", param);
ret = alloc_new_str(buf);
diff --git a/cmd/cmd_cookie.c b/cmd/cmd_cookie.c
index 0c9c5dd..82aaacf 100644
--- a/cmd/cmd_cookie.c
+++ b/cmd/cmd_cookie.c
@@ -10,7 +10,7 @@ void *cmd_cookie(void *data)
printf("COOKIE\n");
- snprintf(buf, buf_size, "No heroes yet\n");
+ snprintf(buf, buf_size, "No heroes yet");
ret = alloc_new_str(buf);
diff --git a/cmd/cmd_date.c b/cmd/cmd_date.c
index 3ccb75a..4f93d9c 100644
--- a/cmd/cmd_date.c
+++ b/cmd/cmd_date.c
@@ -6,7 +6,7 @@ void *cmd_date(void *data)
printf("DATE\n");
- ret = alloc_new_str("I dont whant to date with you\n");
+ ret = alloc_new_str("I dont whant to date with you");
return ret;
} \ No newline at end of file
diff --git a/cmd/cmd_fir.c b/cmd/cmd_fir.c
index 33bb949..28adff5 100644
--- a/cmd/cmd_fir.c
+++ b/cmd/cmd_fir.c
@@ -606,7 +606,7 @@ void *cmd_fir(void *data)
snprintf(str_double, 16, "%.3f ", lp_coef[i]);
out_result = sdscat(out_result, str_double);
}
- out_result = sdscat(out_result, "\n");
+ out_result = sdscat(out_result, "");
ret = alloc_new_str(out_result);
diff --git a/cmd/cmd_fir1p.c b/cmd/cmd_fir1p.c
index 716d432..34f9843 100644
--- a/cmd/cmd_fir1p.c
+++ b/cmd/cmd_fir1p.c
@@ -80,7 +80,7 @@ void *cmd_fir1p(void *data)
snprintf(str_double, 16, "%.3f ", output[i]);
out_result = sdscat(out_result, str_double);
}
- out_result = sdscat(out_result,"\n");
+ out_result = sdscat(out_result,"");
diff --git a/cmd/cmd_loadavg.c b/cmd/cmd_loadavg.c
index 330376e..07d8f4a 100644
--- a/cmd/cmd_loadavg.c
+++ b/cmd/cmd_loadavg.c
@@ -19,7 +19,7 @@ void *cmd_loadavg(void *data)
}
printf("1M %lf 5M %lf 15M %lf\n", loadavg_d[0], loadavg_d[1], loadavg_d[2]);
- snprintf(buf, buf_size,"1M %.1f 5M %.1f 15M %.1f\n", loadavg_d[0], loadavg_d[1], loadavg_d[2]);
+ snprintf(buf, buf_size,"1M %.1f 5M %.1f 15M %.1f", loadavg_d[0], loadavg_d[1], loadavg_d[2]);
ret = alloc_new_str(buf);
diff --git a/cmd/cmd_rand_libc.c b/cmd/cmd_rand_libc.c
index 1860a77..f0bd7a1 100644
--- a/cmd/cmd_rand_libc.c
+++ b/cmd/cmd_rand_libc.c
@@ -35,7 +35,7 @@ void *cmd_rand_libc(void *data)
snprintf(str_integer, 16, "%d ", rand_r(&rand_state));
out_result = sdscat(out_result, str_integer);
}
- out_result = sdscat(out_result,"\n");
+ out_result = sdscat(out_result,"");
snprintf(buf, buf_size, "%s", out_result);
sdsfree(params);
diff --git a/cmd/cmd_rusage.c b/cmd/cmd_rusage.c
index 3dc5d21..eacfb41 100644
--- a/cmd/cmd_rusage.c
+++ b/cmd/cmd_rusage.c
@@ -23,7 +23,7 @@ void *cmd_rusage(void *data)
cur_proc_rusage.ru_utime.tv_sec,
cur_proc_rusage.ru_stime.tv_sec
);
- snprintf(buf, buf_size, "USER %ld SYS %ld\n",
+ snprintf(buf, buf_size, "USER %ld SYS %ld",
cur_proc_rusage.ru_utime.tv_sec,
cur_proc_rusage.ru_stime.tv_sec
);
diff --git a/cmd/cmd_sha1.c b/cmd/cmd_sha1.c
index d7d06d5..7e098ca 100644
--- a/cmd/cmd_sha1.c
+++ b/cmd/cmd_sha1.c
@@ -31,7 +31,7 @@ void *cmd_sha1(void *data)
hex_result[40]=0x0;
- snprintf(buf, buf_size, "sha1 %s\n",hex_result);
+ snprintf(buf, buf_size, "sha1 %s",hex_result);
ret = alloc_new_str(buf);
diff --git a/cmd/cmd_spi.c b/cmd/cmd_spi.c
index bfda27c..668aeb3 100644
--- a/cmd/cmd_spi.c
+++ b/cmd/cmd_spi.c
@@ -17,7 +17,7 @@ char _spi_str_spi[]="""\
| MOSI |\n\
| SCK |\n\
| CS |\n\
---------\n\
+--------\
""";
char _spi_str_slave[]="""\
@@ -27,7 +27,7 @@ slave\n\
| MOSI |<-\n\
| SCK |<-\n\
| CS |<-\n\
---------\n\
+--------\
""";
char _spi_str_master[]="""\
@@ -37,12 +37,12 @@ master\n\
| MOSI |>-\n\
| SCK |>-\n\
| CS |>-\n\
---------\n\
+--------\
""";
char *_spi_help_table[] =
{
- "help" ,"MODES,SPI,SLAVE,MASTER,MISO,MOSI,SCK,HOLD,CS",
+ "HELP" ,"MODES,SPI,SLAVE,MASTER,MISO,MOSI,SCK,HOLD,CS",
"MODES" ,"QUAD(4-wires),DOUBLE(3-wires),SINGLE(2-wires)",
"SPI" ,_spi_str_spi,
"SLAVE" ,_spi_str_slave,
diff --git a/cmd/cmd_uptime.c b/cmd/cmd_uptime.c
index 4f0a4f3..c4dfda7 100644
--- a/cmd/cmd_uptime.c
+++ b/cmd/cmd_uptime.c
@@ -25,7 +25,7 @@ void *cmd_uptime(void *data)
i1 = d1;
printf("Days %d Hours %d Minutes %d\n",i1/(3600*24),i1/(3600)%24, (i1/60)%60);
- snprintf(buf, buf_size,"%dd %dh %dm\n",i1/(3600*24),i1/(3600)%24, (i1/60)%60);
+ snprintf(buf, buf_size,"%dd %dh %dm",i1/(3600*24),i1/(3600)%24, (i1/60)%60);
ret = alloc_new_str(buf);
diff --git a/cmd/cmd_version.c b/cmd/cmd_version.c
index 75bd83b..f436eb1 100644
--- a/cmd/cmd_version.c
+++ b/cmd/cmd_version.c
@@ -9,7 +9,7 @@ void *cmd_version(void *data)
printf("VERSION\n");
- snprintf(buf, buf_size, "VERSION:0.0.5" " DATE:" VERSION_DATE " COMMIT:" VERSION_COMMIT "\n");
+ snprintf(buf, buf_size, "VERSION:0.0.6" " DATE:" VERSION_DATE " COMMIT:" VERSION_COMMIT "");
ret = alloc_new_str(buf);