You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/25 02:44:33 UTC
[incubator-nuttx-apps] branch master updated (24b6f91 -> 72d9b34)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git.
from 24b6f91 examples/mld: Fix undefined reference to `mld_catfile'
new f83caca netutils/ftpc/ftpc_getfile.c: Appease nxstyle
new 7b3ccfa netutils/ftpc/ftpc_getfile.c: Fix a syslog format
new 2a3f2ea netutils/ftpc/ftpc_putfile.c: Appease nxstyle
new 13424fc netutils/ftpc/ftpc_putfile.c: Fix syslog formats
new eeded9d netutils/ntpclient/ntpclient.c: Fix syslog formats
new 5a4bf6b netutils/tftpc/tftpc_get.c: Fix a syslog format
new 72d9b34 netutils/tftpc/tftpc_put.c: Fix syslog formats
The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
netutils/ftpc/ftpc_getfile.c | 36 ++++++++++++++++++++----------------
netutils/ftpc/ftpc_putfile.c | 14 ++++++++------
netutils/ntpclient/ntpclient.c | 4 ++--
netutils/tftpc/tftpc_get.c | 2 +-
netutils/tftpc/tftpc_put.c | 4 ++--
5 files changed, 33 insertions(+), 27 deletions(-)
[incubator-nuttx-apps] 05/07: netutils/ntpclient/ntpclient.c: Fix
syslog formats
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit eeded9daa1b664ba1d4b93ed85523414ffa1d303
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:34:33 2020 +0900
netutils/ntpclient/ntpclient.c: Fix syslog formats
---
netutils/ntpclient/ntpclient.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/netutils/ntpclient/ntpclient.c b/netutils/ntpclient/ntpclient.c
index bc9bfef..5bda91c 100644
--- a/netutils/ntpclient/ntpclient.c
+++ b/netutils/ntpclient/ntpclient.c
@@ -296,7 +296,7 @@ static void ntpc_settime(FAR uint8_t *timestamp)
tp.tv_nsec = nsec;
clock_settime(CLOCK_REALTIME, &tp);
- sinfo("Set time to %lu seconds: %d\n", (unsigned long)tp.tv_sec, ret);
+ sinfo("Set time to %ju seconds\n", (intmax_t)tp.tv_sec);
}
/****************************************************************************
@@ -559,7 +559,7 @@ int ntpc_start(void)
DEBUGASSERT(errval > 0);
g_ntpc_daemon.state = NTP_STOPPED;
- nerr("ERROR: Failed to start the NTP daemon\n", errval);
+ nerr("ERROR: Failed to start the NTP daemon: %d\n", errval);
sem_post(&g_ntpc_daemon.lock);
return -errval;
}
[incubator-nuttx-apps] 02/07: netutils/ftpc/ftpc_getfile.c: Fix a
syslog format
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 7b3ccfa9daa4d61adc05abb9a141089e92b73593
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:28:20 2020 +0900
netutils/ftpc/ftpc_getfile.c: Fix a syslog format
---
netutils/ftpc/ftpc_getfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/netutils/ftpc/ftpc_getfile.c b/netutils/ftpc/ftpc_getfile.c
index fb5a895..dd2ca62 100644
--- a/netutils/ftpc/ftpc_getfile.c
+++ b/netutils/ftpc/ftpc_getfile.c
@@ -265,7 +265,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname,
abslpath = ftpc_abslpath(session, lname);
if (!abslpath)
{
- nwarn("WARNING: ftpc_abslpath(%s) failed: %d\n", errno);
+ nwarn("WARNING: ftpc_abslpath(%s) failed: %d\n", lname, errno);
goto errout;
}
[incubator-nuttx-apps] 06/07: netutils/tftpc/tftpc_get.c: Fix a
syslog format
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 5a4bf6b349a65c68b399b10997f50cea3682be03
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:35:46 2020 +0900
netutils/tftpc/tftpc_get.c: Fix a syslog format
---
netutils/tftpc/tftpc_get.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/netutils/tftpc/tftpc_get.c b/netutils/tftpc/tftpc_get.c
index 9ad2bde..38ef730 100644
--- a/netutils/tftpc/tftpc_get.c
+++ b/netutils/tftpc/tftpc_get.c
@@ -333,7 +333,7 @@ static ssize_t tftp_write(FAR void *ctx, uint32_t offset, FAR uint8_t *buf,
/* Handle partial writes */
- ninfo("Wrote %d bytes to file\n", nbyteswritten);
+ ninfo("Wrote %zd bytes to file\n", nbyteswritten);
left -= nbyteswritten;
buf += nbyteswritten;
}
[incubator-nuttx-apps] 03/07: netutils/ftpc/ftpc_putfile.c: Appease
nxstyle
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 2a3f2ea8c6cebf6fca3f4c6e37ed5affce5884e5
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:29:18 2020 +0900
netutils/ftpc/ftpc_putfile.c: Appease nxstyle
---
netutils/ftpc/ftpc_putfile.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/netutils/ftpc/ftpc_putfile.c b/netutils/ftpc/ftpc_putfile.c
index b138146..17bde8a 100644
--- a/netutils/ftpc/ftpc_putfile.c
+++ b/netutils/ftpc/ftpc_putfile.c
@@ -87,11 +87,12 @@ static int ftpc_sendbinary(FAR struct ftpc_session_s *session,
/* Loop until the entire file is sent */
- for (;;)
+ for (; ; )
{
/* Read data from the file */
- nread = fread(session->buffer, sizeof(char), CONFIG_FTP_BUFSIZE, linstream);
+ nread = fread(session->buffer, sizeof(char), CONFIG_FTP_BUFSIZE,
+ linstream);
if (nread <= 0)
{
/* nread == 0 is just EOF */
@@ -271,13 +272,14 @@ static int ftpc_sendfile(struct ftpc_session_s *session, const char *path,
{
if (*str == '\'')
{
- rname = strndup(str+1, len-3);
+ rname = strndup(str + 1, len - 3);
}
else
{
- rname = strndup(str, len-1);
+ rname = strndup(str, len - 1);
ninfo("Unique filename is: %s\n", rname);
}
+
free(rname);
}
}
[incubator-nuttx-apps] 01/07: netutils/ftpc/ftpc_getfile.c: Appease
nxstyle
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit f83caca9acac00e2b7ba7073b7f776fd8c242ee3
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:27:01 2020 +0900
netutils/ftpc/ftpc_getfile.c: Appease nxstyle
---
netutils/ftpc/ftpc_getfile.c | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/netutils/ftpc/ftpc_getfile.c b/netutils/ftpc/ftpc_getfile.c
index 3c6530b..fb5a895 100644
--- a/netutils/ftpc/ftpc_getfile.c
+++ b/netutils/ftpc/ftpc_getfile.c
@@ -78,7 +78,8 @@
*
****************************************************************************/
-static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path,
+static int ftpc_recvinit(struct ftpc_session_s *session,
+ FAR const char *path,
uint8_t xfrmode, off_t offset)
{
int ret;
@@ -180,11 +181,12 @@ static int ftpc_recvbinary(FAR struct ftpc_session_s *session,
/* Loop until the entire file is received */
- for (;;)
+ for (; ; )
{
/* Read the data from the socket */
- nread = fread(session->buffer, sizeof(char), CONFIG_FTP_BUFSIZE, rinstream);
+ nread = fread(session->buffer, sizeof(char), CONFIG_FTP_BUFSIZE,
+ rinstream);
if (nread <= 0)
{
/* nread < 0 is an error */
@@ -213,7 +215,7 @@ static int ftpc_recvbinary(FAR struct ftpc_session_s *session,
* What would a short write mean?
*/
- return ERROR;
+ return ERROR;
}
/* Increment the size of the file written */
@@ -234,7 +236,8 @@ static int ftpc_recvbinary(FAR struct ftpc_session_s *session,
*
****************************************************************************/
-int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname,
+int ftpc_getfile(SESSION handle, FAR const char *rname,
+ FAR const char *lname,
uint8_t how, uint8_t xfrmode)
{
FAR struct ftpc_session_s *session = (FAR struct ftpc_session_s *)handle;
@@ -312,7 +315,8 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname,
goto errout_with_abspath;
}
- loutstream = fopen(abslpath, (offset > 0 || (how == FTPC_GET_APPEND)) ? "a" : "w");
+ loutstream = fopen(abslpath,
+ (offset > 0 || (how == FTPC_GET_APPEND)) ? "a" : "w");
if (!loutstream)
{
nerr("ERROR: fopen failed: %d\n", errno);
@@ -410,18 +414,18 @@ int ftpc_recvtext(FAR struct ftpc_session_s *session,
}
}
- /* Then write the character to the output file */
+ /* Then write the character to the output file */
- if (fputc(ch, loutstream) == EOF)
- {
- ftpc_xfrabort(session, loutstream);
- return ERROR;
- }
+ if (fputc(ch, loutstream) == EOF)
+ {
+ ftpc_xfrabort(session, loutstream);
+ return ERROR;
+ }
- /* Increase the actual size of the file by one */
+ /* Increase the actual size of the file by one */
- session->size++;
- }
+ session->size++;
+ }
return OK;
}
[incubator-nuttx-apps] 07/07: netutils/tftpc/tftpc_put.c: Fix
syslog formats
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 72d9b34fb13958b5798a180f815257446f57f597
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:36:46 2020 +0900
netutils/tftpc/tftpc_put.c: Fix syslog formats
---
netutils/tftpc/tftpc_put.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/netutils/tftpc/tftpc_put.c b/netutils/tftpc/tftpc_put.c
index bbd190a..d3be5f7 100644
--- a/netutils/tftpc/tftpc_put.c
+++ b/netutils/tftpc/tftpc_put.c
@@ -165,11 +165,11 @@ static int tftp_rcvack(int sd, FAR uint8_t *packet,
if (nbytes == 0)
{
- nerr("ERROR: Connection lost: %d bytes\n", nbytes);
+ nerr("ERROR: Connection lost: %zd bytes\n", nbytes);
}
else if (nbytes > 0)
{
- nerr("ERROR: Short packet: %d bytes\n", nbytes);
+ nerr("ERROR: Short packet: %zd bytes\n", nbytes);
}
else
{
[incubator-nuttx-apps] 04/07: netutils/ftpc/ftpc_putfile.c: Fix
syslog formats
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 13424fc404155d135edce3f222588a73ff2d614c
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:33:26 2020 +0900
netutils/ftpc/ftpc_putfile.c: Fix syslog formats
---
netutils/ftpc/ftpc_putfile.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/netutils/ftpc/ftpc_putfile.c b/netutils/ftpc/ftpc_putfile.c
index 17bde8a..dbb1f8f 100644
--- a/netutils/ftpc/ftpc_putfile.c
+++ b/netutils/ftpc/ftpc_putfile.c
@@ -402,7 +402,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname,
abslpath = ftpc_abslpath(session, lname);
if (!abslpath)
{
- nwarn("WARNING: ftpc_abslpath(%s) failed: %d\n", errno);
+ nwarn("WARNING: ftpc_abslpath(%s) failed: %d\n", lname, errno);
goto errout;
}
@@ -411,7 +411,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname,
ret = stat(abslpath, &statbuf);
if (ret != OK)
{
- nwarn("WARNING: stat(%s) failed: %d\n", errno);
+ nwarn("WARNING: stat(%s) failed: %d\n", abslpath, errno);
goto errout_with_abspath;
}