You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2015/12/03 00:31:45 UTC
[3/3] incubator-mynewt-larva git commit: nffs_open() is now fs_open().
nffs_open() is now fs_open().
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/9361e8b6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/9361e8b6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/9361e8b6
Branch: refs/heads/master
Commit: 9361e8b6f64398583d3344dd351016bbed04d696
Parents: 547a3bc
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Wed Dec 2 15:30:07 2015 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Wed Dec 2 15:30:07 2015 -0800
----------------------------------------------------------------------
project/ffs2native/src/main.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/9361e8b6/project/ffs2native/src/main.c
----------------------------------------------------------------------
diff --git a/project/ffs2native/src/main.c b/project/ffs2native/src/main.c
index 12377ec..fdab0dd 100644
--- a/project/ffs2native/src/main.c
+++ b/project/ffs2native/src/main.c
@@ -28,6 +28,7 @@
#include <strings.h>
#include "../src/nffs_priv.h"
#include <os/queue.h>
+#include <fs/fs.h>
#include <nffs/nffs.h>
#include <hal/hal_flash.h>
#include <util/flash_map.h>
@@ -111,12 +112,12 @@ printfs(void)
void
copy_in_file(char *src, char *dst)
{
- struct nffs_file *nf;
+ struct fs_file *nf;
FILE *fp;
int rc;
char data[32];
- rc = nffs_open(dst, FS_ACCESS_WRITE, &nf);
+ rc = fs_open(dst, FS_ACCESS_WRITE, &nf);
assert(rc == 0);
fp = fopen(src, "r");
@@ -125,10 +126,10 @@ copy_in_file(char *src, char *dst)
assert(0);
}
while ((rc = fread(data, 1, sizeof(data), fp))) {
- rc = nffs_write(nf, data, rc);
+ rc = fs_write(nf, data, rc);
assert(rc == 0);
}
- rc = nffs_close(nf);
+ rc = fs_close(nf);
assert(rc == 0);
}
@@ -152,7 +153,7 @@ copy_in_directory(const char *src, const char *dst)
if (entry->d_type == DT_DIR &&
!strcmp(entry->d_name, ".") && !strcmp(entry->d_name, "..")) {
copy_in_directory(src_name, dst_name);
- rc = nffs_mkdir(dst_name);
+ rc = fs_mkdir(dst_name);
assert(rc == 0);
} else if (entry->d_type == DT_REG) {
copy_in_file(src_name, dst_name);