diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-03 20:27:30 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-03 20:27:30 +0000 |
commit | 92fd8f5221ca528c2def13897c712d558adf1675 (patch) | |
tree | 0c9d63fe3408864b46597a4eb1c20eace2ffc783 /apps/examples | |
parent | 90e92459a9c7a33fb8a005f87ec3f512b760c487 (diff) | |
download | px4-nuttx-92fd8f5221ca528c2def13897c712d558adf1675.tar.gz px4-nuttx-92fd8f5221ca528c2def13897c712d558adf1675.tar.bz2 px4-nuttx-92fd8f5221ca528c2def13897c712d558adf1675.zip |
More FTP bugfixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3665 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples')
-rw-r--r-- | apps/examples/README.txt | 8 | ||||
-rwxr-xr-x | apps/examples/ftpc/ftpc_cmds.c | 9 |
2 files changed, 11 insertions, 6 deletions
diff --git a/apps/examples/README.txt b/apps/examples/README.txt index 2a15dac5d..a67d9ad04 100644 --- a/apps/examples/README.txt +++ b/apps/examples/README.txt @@ -56,9 +56,13 @@ examples/ftpc to that it will only work as a "built-in" program that can be run from NSH when CONFIG_NSH_BUILTIN_APPS is defined. - From NSH, the startup command line is then: + From NSH, the startup command sequence is as follows. This is only + an example, your configration could have different mass storage devices, + mount paths, and FTP directories: - ftpc xx.xx.xx.xx[:pp] + mount -t vfat /dev/mmcsd0 /tmp # Mount the SD card at /tmp + cd /tmp # cd into the /tmp directory + ftpc xx.xx.xx.xx[:pp] # Start the FTP client where xx.xx.xx.xx is the IP address of the FTP server and pp is an optional port number. diff --git a/apps/examples/ftpc/ftpc_cmds.c b/apps/examples/ftpc/ftpc_cmds.c index fd07a68ca..f0a0a2413 100755 --- a/apps/examples/ftpc/ftpc_cmds.c +++ b/apps/examples/ftpc/ftpc_cmds.c @@ -108,7 +108,7 @@ int cmd_rchdir(SESSION handle, int argc, char **argv) int cmd_rpwd(SESSION handle, int argc, char **argv)
{
- FAR char *pwd = ftpc_pwd(handle);
+ FAR char *pwd = ftpc_rpwd(handle);
if (pwd)
{
printf("PWD: %s\n", pwd);
@@ -178,8 +178,8 @@ int cmd_rrename(SESSION handle, int argc, char **argv) int cmd_rsize(SESSION handle, int argc, char **argv)
{
- uint64_t size = ftpc_filesize(handle, argv[1]);
- printf("SIZE: %ull\n", size);
+ off_t size = ftpc_filesize(handle, argv[1]);
+ printf("SIZE: %lu\n", size);
return OK;
}
@@ -190,7 +190,7 @@ int cmd_rsize(SESSION handle, int argc, char **argv) int cmd_rtime(SESSION handle, int argc, char **argv)
{
time_t filetime = ftpc_filetime(handle, argv[1]);
- printf("TIME: %ul\n", (long)filetime);
+ printf("TIME: %lu\n", (long)filetime);
return OK;
}
@@ -264,6 +264,7 @@ int cmd_rls(SESSION handle, int argc, char **argv) {
printf(" %s\n", dirlist->name[i]);
}
+ FFLUSH();
ftpc_dirfree(dirlist);
return OK;
|