Renamed all prefixes to include the major version

This is needed to allow compilation of multiple versions in the same
binary. Also note that the FUSE testing was removed because of related
name issues.

./scripts/prefix.py lfs2
This commit is contained in:
Christopher Haster
2019-01-30 14:00:35 -06:00
parent 95c1a6339d
commit 97e21eb68e
27 changed files with 5573 additions and 5606 deletions

View File

@@ -1,6 +1,6 @@
/// AUTOGENERATED TEST ///
#include "lfs.h"
#include "emubd/lfs_emubd.h"
#include "lfs2.h"
#include "emubd/lfs2_emubd.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -37,7 +37,7 @@ static void test_assert(const char *file, unsigned line,
// utility functions for traversals
static int __attribute__((used)) test_count(void *p, lfs_block_t b) {{
static int __attribute__((used)) test_count(void *p, lfs2_block_t b) {{
(void)b;
unsigned *u = (unsigned*)p;
*u += 1;
@@ -45,72 +45,72 @@ static int __attribute__((used)) test_count(void *p, lfs_block_t b) {{
}}
// lfs declarations
lfs_t lfs;
lfs_emubd_t bd;
lfs_file_t file[4];
lfs_dir_t dir[4];
struct lfs_info info;
// lfs2 declarations
lfs2_t lfs2;
lfs2_emubd_t bd;
lfs2_file_t file[4];
lfs2_dir_t dir[4];
struct lfs2_info info;
uint8_t buffer[1024];
uint8_t wbuffer[1024];
uint8_t rbuffer[1024];
lfs_size_t size;
lfs_size_t wsize;
lfs_size_t rsize;
lfs2_size_t size;
lfs2_size_t wsize;
lfs2_size_t rsize;
uintmax_t test;
#ifndef LFS_READ_SIZE
#define LFS_READ_SIZE 16
#ifndef LFS2_READ_SIZE
#define LFS2_READ_SIZE 16
#endif
#ifndef LFS_PROG_SIZE
#define LFS_PROG_SIZE LFS_READ_SIZE
#ifndef LFS2_PROG_SIZE
#define LFS2_PROG_SIZE LFS2_READ_SIZE
#endif
#ifndef LFS_BLOCK_SIZE
#define LFS_BLOCK_SIZE 512
#ifndef LFS2_BLOCK_SIZE
#define LFS2_BLOCK_SIZE 512
#endif
#ifndef LFS_BLOCK_COUNT
#define LFS_BLOCK_COUNT 1024
#ifndef LFS2_BLOCK_COUNT
#define LFS2_BLOCK_COUNT 1024
#endif
#ifndef LFS_BLOCK_CYCLES
#define LFS_BLOCK_CYCLES 1024
#ifndef LFS2_BLOCK_CYCLES
#define LFS2_BLOCK_CYCLES 1024
#endif
#ifndef LFS_CACHE_SIZE
#define LFS_CACHE_SIZE 64
#ifndef LFS2_CACHE_SIZE
#define LFS2_CACHE_SIZE 64
#endif
#ifndef LFS_LOOKAHEAD_SIZE
#define LFS_LOOKAHEAD_SIZE 16
#ifndef LFS2_LOOKAHEAD_SIZE
#define LFS2_LOOKAHEAD_SIZE 16
#endif
const struct lfs_config cfg = {{
const struct lfs2_config cfg = {{
.context = &bd,
.read = &lfs_emubd_read,
.prog = &lfs_emubd_prog,
.erase = &lfs_emubd_erase,
.sync = &lfs_emubd_sync,
.read = &lfs2_emubd_read,
.prog = &lfs2_emubd_prog,
.erase = &lfs2_emubd_erase,
.sync = &lfs2_emubd_sync,
.read_size = LFS_READ_SIZE,
.prog_size = LFS_PROG_SIZE,
.block_size = LFS_BLOCK_SIZE,
.block_count = LFS_BLOCK_COUNT,
.block_cycles = LFS_BLOCK_CYCLES,
.cache_size = LFS_CACHE_SIZE,
.lookahead_size = LFS_LOOKAHEAD_SIZE,
.read_size = LFS2_READ_SIZE,
.prog_size = LFS2_PROG_SIZE,
.block_size = LFS2_BLOCK_SIZE,
.block_count = LFS2_BLOCK_COUNT,
.block_cycles = LFS2_BLOCK_CYCLES,
.cache_size = LFS2_CACHE_SIZE,
.lookahead_size = LFS2_LOOKAHEAD_SIZE,
}};
// Entry point
int main(void) {{
lfs_emubd_create(&cfg, "blocks");
lfs2_emubd_create(&cfg, "blocks");
{tests}
lfs_emubd_destroy(&cfg);
lfs2_emubd_destroy(&cfg);
}}