Rename battfs_init to battfs_mount and battfs_close to battfs_umount.
[bertos.git] / bertos / fs / battfs.c
index 9e3ea4eedef65e487d014a173db4a36efa40582c..ae3cde9ed7940e361a4942bd53548852225e2b66 100644 (file)
@@ -232,7 +232,7 @@ static pgcnt_t countPages(pgoff_t *filelen_table, inode_t inode)
 static void movePages(struct BattFsSuper *disk, pgcnt_t src, int offset)
 {
        pgcnt_t dst = src + offset;
-       LOG_INFO("src %d, offset %d, size %ld\n", src, offset, (disk->page_count - MAX(dst, src)) * sizeof(pgcnt_t));
+       LOG_INFO("src %d, offset %d, size %d\n", src, offset, (unsigned int)((disk->page_count - MAX(dst, src)) * sizeof(pgcnt_t)));
        memmove(&disk->page_array[dst], &disk->page_array[src], (disk->page_count - MAX(dst, src)) * sizeof(pgcnt_t));
 
        if (offset < 0)
@@ -438,7 +438,7 @@ static bool loadPage(struct BattFsSuper *disk, pgcnt_t new_page, BattFsPageHeade
  * \a disk.
  * \return false on errors, true otherwise.
  */
-bool battfs_init(struct BattFsSuper *disk)
+bool battfs_mount(struct BattFsSuper *disk)
 {
        pgoff_t filelen_table[BATTFS_MAX_FILES];
 
@@ -958,9 +958,9 @@ bool battfs_fileopen(BattFsSuper *disk, BattFs *fd, inode_t inode, filemode_t mo
 }
 
 /**
- * Close \a disk.
+ * Umount \a disk.
  */
-bool battfs_close(struct BattFsSuper *disk)
+bool battfs_umount(struct BattFsSuper *disk)
 {
        Node *n;
        int res = 0;