Renamed config -> cfg

Note this includes both the lfs3_config -> lfs3_cfg structs as well as
the LFS3_CONFIG -> LFS3_CFG include define:

- LFS3_CONFIG -> LFS3_CFG
- struct lfs3_config -> struct lfs3_cfg
- struct lfs3_file_config -> struct lfs3_file_cfg
- struct lfs3_*bd_config -> struct lfs3_*bd_cfg
- cfg -> cfg

We were already using cfg as the variable name everywhere. The fact that
these names were different was an inconsistency that should be fixed
since we're committing to an API break.

LFS3_CFG is already out-of-date from upstream, and there's plans for a
config rework, but I figured I'd go ahead and change it as well to lower
the chances it gets overlooked.

---

Note this does _not_ affect LFS3_TAG_CONFIG. Having the on-disk vs
driver-level config take slightly different names is not a bad thing.
This commit is contained in:
Christopher Haster
2025-07-18 18:17:45 -05:00
parent d410d4dfad
commit 7b330d67eb
21 changed files with 249 additions and 249 deletions
+4 -4
View File
@@ -23,7 +23,7 @@ defines.ERASE = [false, true]
in = 'lfs3.c'
code = '''
// test various block counts
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -67,7 +67,7 @@ defines.ERASE = [false, true]
in = 'lfs3.c'
code = '''
// test various block counts
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -647,7 +647,7 @@ defines.COUNT = [
]
code = '''
// test various block counts
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -729,7 +729,7 @@ defines.SIZE = [
]
code = '''
// test various block counts
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
+47 -47
View File
@@ -2071,7 +2071,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -2153,7 +2153,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -2225,7 +2225,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -2299,7 +2299,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -2365,7 +2365,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -2438,7 +2438,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -2536,7 +2536,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -2647,7 +2647,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -2755,7 +2755,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -2869,7 +2869,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -2981,7 +2981,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -3092,7 +3092,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -3190,7 +3190,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -3298,7 +3298,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -3406,7 +3406,7 @@ code = '''
.size = (MUTSIZE) ? &c_size : NULL,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 3,
};
@@ -3508,7 +3508,7 @@ code = '''
uint8_t c_buf[3][256];
lfs3_ssize_t c_size[3];
struct lfs3_attr attrs[3][3];
struct lfs3_file_config filecfg[3];
struct lfs3_file_cfg filecfg[3];
lfs3_file_t file[3];
for (lfs3_size_t i = 0; i < 3; i++) {
attrs[i][0] = (struct lfs3_attr){
@@ -3532,7 +3532,7 @@ code = '''
.buffer_size = sizeof(c_buf[i]),
.size = (MUTSIZE) ? &c_size[i] : NULL,
};
filecfg[i] = (struct lfs3_file_config){
filecfg[i] = (struct lfs3_file_cfg){
.attrs = attrs[i],
.attr_count = 3,
};
@@ -3622,7 +3622,7 @@ code = '''
uint8_t c_buf[3][256];
lfs3_ssize_t c_size[3];
struct lfs3_attr attrs[3][3];
struct lfs3_file_config filecfg[3];
struct lfs3_file_cfg filecfg[3];
lfs3_file_t file[3];
for (lfs3_size_t i = 0; i < 3; i++) {
attrs[i][0] = (struct lfs3_attr){
@@ -3646,7 +3646,7 @@ code = '''
.buffer_size = sizeof(c_buf[i]),
.size = (MUTSIZE) ? &c_size[i] : NULL,
};
filecfg[i] = (struct lfs3_file_config){
filecfg[i] = (struct lfs3_file_cfg){
.attrs = attrs[i],
.attr_count = 3,
};
@@ -3727,7 +3727,7 @@ code = '''
uint8_t c_buf[3][256];
lfs3_ssize_t c_size[3];
struct lfs3_attr attrs[3][3];
struct lfs3_file_config filecfg[3];
struct lfs3_file_cfg filecfg[3];
lfs3_file_t file[3];
for (lfs3_size_t i = 0; i < 3; i++) {
attrs[i][0] = (struct lfs3_attr){
@@ -3751,7 +3751,7 @@ code = '''
.buffer_size = sizeof(c_buf[i]),
.size = (MUTSIZE) ? &c_size[i] : NULL,
};
filecfg[i] = (struct lfs3_file_config){
filecfg[i] = (struct lfs3_file_cfg){
.attrs = attrs[i],
.attr_count = 3,
};
@@ -3834,7 +3834,7 @@ code = '''
uint8_t c_buf[3][256];
lfs3_ssize_t c_size[3];
struct lfs3_attr attrs[3][3];
struct lfs3_file_config filecfg[3];
struct lfs3_file_cfg filecfg[3];
lfs3_file_t file[3];
for (lfs3_size_t i = 0; i < 3; i++) {
attrs[i][0] = (struct lfs3_attr){
@@ -3858,7 +3858,7 @@ code = '''
.buffer_size = sizeof(c_buf[i]),
.size = (MUTSIZE) ? &c_size[i] : NULL,
};
filecfg[i] = (struct lfs3_file_config){
filecfg[i] = (struct lfs3_file_cfg){
.attrs = attrs[i],
.attr_count = 3,
};
@@ -3935,7 +3935,7 @@ code = '''
uint8_t c_buf[3][256];
lfs3_ssize_t c_size[3];
struct lfs3_attr attrs[3][3];
struct lfs3_file_config filecfg[3];
struct lfs3_file_cfg filecfg[3];
lfs3_file_t file[3];
for (lfs3_size_t i = 0; i < 3; i++) {
attrs[i][0] = (struct lfs3_attr){
@@ -3959,7 +3959,7 @@ code = '''
.buffer_size = sizeof(c_buf[i]),
.size = (MUTSIZE) ? &c_size[i] : NULL,
};
filecfg[i] = (struct lfs3_file_config){
filecfg[i] = (struct lfs3_file_cfg){
.attrs = attrs[i],
.attr_count = 3,
};
@@ -4126,7 +4126,7 @@ code = '''
uint8_t c_buf[3][256];
lfs3_ssize_t c_size[3];
struct lfs3_attr attrs[3][3];
struct lfs3_file_config filecfg[3];
struct lfs3_file_cfg filecfg[3];
lfs3_file_t file[3];
for (lfs3_size_t i = 0; i < 3; i++) {
attrs[i][0] = (struct lfs3_attr){
@@ -4150,7 +4150,7 @@ code = '''
.buffer_size = sizeof(c_buf[i]),
.size = (MUTSIZE) ? &c_size[i] : NULL,
};
filecfg[i] = (struct lfs3_file_config){
filecfg[i] = (struct lfs3_file_cfg){
.attrs = attrs[i],
.attr_count = 3,
};
@@ -4278,7 +4278,7 @@ code = '''
uint8_t c_buf[3][256];
lfs3_ssize_t c_size[3];
struct lfs3_attr attrs[3][3];
struct lfs3_file_config filecfg[3];
struct lfs3_file_cfg filecfg[3];
lfs3_file_t file[3];
for (lfs3_size_t i = 0; i < 3; i++) {
attrs[i][0] = (struct lfs3_attr){
@@ -4302,7 +4302,7 @@ code = '''
.buffer_size = sizeof(c_buf[i]),
.size = (MUTSIZE) ? &c_size[i] : NULL,
};
filecfg[i] = (struct lfs3_file_config){
filecfg[i] = (struct lfs3_file_cfg){
.attrs = attrs[i],
.attr_count = 3,
};
@@ -4467,7 +4467,7 @@ code = '''
uint8_t c_buf[3][256];
lfs3_ssize_t c_size[3];
struct lfs3_attr attrs[3][3];
struct lfs3_file_config filecfg[3];
struct lfs3_file_cfg filecfg[3];
lfs3_file_t file[3];
for (lfs3_size_t i = 0; i < 3; i++) {
attrs[i][0] = (struct lfs3_attr){
@@ -4491,7 +4491,7 @@ code = '''
.buffer_size = sizeof(c_buf[i]),
.size = (MUTSIZE) ? &c_size[i] : NULL,
};
filecfg[i] = (struct lfs3_file_config){
filecfg[i] = (struct lfs3_file_cfg){
.attrs = attrs[i],
.attr_count = 3,
};
@@ -4617,7 +4617,7 @@ code = '''
uint8_t c_buf[3][256];
lfs3_ssize_t c_size[3];
struct lfs3_attr attrs[3][3];
struct lfs3_file_config filecfg[3];
struct lfs3_file_cfg filecfg[3];
lfs3_file_t file[3];
for (lfs3_size_t i = 0; i < 3; i++) {
attrs[i][0] = (struct lfs3_attr){
@@ -4641,7 +4641,7 @@ code = '''
.buffer_size = sizeof(c_buf[i]),
.size = (MUTSIZE) ? &c_size[i] : NULL,
};
filecfg[i] = (struct lfs3_file_config){
filecfg[i] = (struct lfs3_file_cfg){
.attrs = attrs[i],
.attr_count = 3,
};
@@ -4750,7 +4750,7 @@ code = '''
uint8_t c_buf[3][256];
lfs3_ssize_t c_size[3];
struct lfs3_attr attrs[3][3];
struct lfs3_file_config filecfg[3];
struct lfs3_file_cfg filecfg[3];
lfs3_file_t file[3];
for (lfs3_size_t i = 0; i < 3; i++) {
attrs[i][0] = (struct lfs3_attr){
@@ -4774,7 +4774,7 @@ code = '''
.buffer_size = sizeof(c_buf[i]),
.size = (MUTSIZE) ? &c_size[i] : NULL,
};
filecfg[i] = (struct lfs3_file_config){
filecfg[i] = (struct lfs3_file_cfg){
.attrs = attrs[i],
.attr_count = 3,
};
@@ -4992,7 +4992,7 @@ code = '''
.size = &a_size,
}
};
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = 1,
};
@@ -5069,7 +5069,7 @@ code = '''
.buffer_size = SIZE,
};
}
struct lfs3_file_config filecfg = {
struct lfs3_file_cfg filecfg = {
.attrs = attrs,
.attr_count = M,
};
@@ -5136,7 +5136,7 @@ code = '''
uint8_t a_buf[N][M][SIZE];
lfs3_ssize_t a_size[N][M];
struct lfs3_attr attrs[N][M];
struct lfs3_file_config filecfg[N];
struct lfs3_file_cfg filecfg[N];
lfs3_file_t file[N];
// create N files
@@ -5152,7 +5152,7 @@ code = '''
.size = &a_size[x][a],
};
}
filecfg[x] = (struct lfs3_file_config){
filecfg[x] = (struct lfs3_file_cfg){
.attrs = attrs[x],
.attr_count = M,
};
@@ -5254,7 +5254,7 @@ code = '''
uint8_t a_buf[N][H][M][SIZE];
lfs3_ssize_t a_size[N][H][M];
struct lfs3_attr attrs[N][H][M];
struct lfs3_file_config filecfg[N][H];
struct lfs3_file_cfg filecfg[N][H];
lfs3_file_t file[N][H];
// create N files
@@ -5271,7 +5271,7 @@ code = '''
.size = &a_size[x][y][a],
};
}
filecfg[x][y] = (struct lfs3_file_config){
filecfg[x][y] = (struct lfs3_file_cfg){
.attrs = attrs[x][y],
.attr_count = M,
};
@@ -5381,7 +5381,7 @@ code = '''
uint8_t a_buf[N][M][SIZE];
lfs3_ssize_t a_size[N][M];
struct lfs3_attr attrs[N][M];
struct lfs3_file_config filecfg[N];
struct lfs3_file_cfg filecfg[N];
lfs3_file_t file[N];
// create N files
@@ -5397,7 +5397,7 @@ code = '''
.size = &a_size[x][a],
};
}
filecfg[x] = (struct lfs3_file_config){
filecfg[x] = (struct lfs3_file_cfg){
.attrs = attrs[x],
.attr_count = M,
};
@@ -5634,7 +5634,7 @@ code = '''
uint8_t a_buf[M][SIZE];
lfs3_ssize_t a_size[M];
struct lfs3_attr attrs[M];
struct lfs3_file_config filecfg;
struct lfs3_file_cfg filecfg;
lfs3_file_t file;
for (lfs3_size_t a = 0; a < M; a++) {
attrs[a] = (struct lfs3_attr){
@@ -5645,7 +5645,7 @@ code = '''
.size = &a_size[a],
};
}
filecfg = (struct lfs3_file_config){
filecfg = (struct lfs3_file_cfg){
.attrs = attrs,
.attr_count = M,
};
@@ -5710,7 +5710,7 @@ code = '''
uint8_t a_buf[M][SIZE];
lfs3_ssize_t a_size[M];
struct lfs3_attr attrs[M];
struct lfs3_file_config filecfg;
struct lfs3_file_cfg filecfg;
lfs3_file_t file;
for (lfs3_size_t a = 0; a < M; a++) {
attrs[a] = (struct lfs3_attr){
@@ -5721,7 +5721,7 @@ code = '''
.size = &a_size[a],
};
}
filecfg = (struct lfs3_file_config){
filecfg = (struct lfs3_file_cfg){
.attrs = attrs,
.attr_count = M,
};
+29 -29
View File
@@ -37,7 +37,7 @@ code = '''
#define LFSP_DISK_VERSION_MAJOR LFS3_DISK_VERSION_MAJOR
#define LFSP_DISK_VERSION_MINOR LFS3_DISK_VERSION_MINOR
#define lfsp_t lfs3_t
#define lfsp_config lfs3_config
#define lfsp_cfg lfs3_cfg
#define LFSP_ERR_NOENT LFS3_ERR_NOENT
#define lfsp_format lfs3_format
#define LFSP_M_RDWR LFS3_M_RDWR
@@ -78,8 +78,8 @@ if = [
]
code = '''
// create the previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfs3_format(&lfsp, LFS3_F_RDWR, &cfgp) => 0;
@@ -105,8 +105,8 @@ if = [
]
code = '''
// create the previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfs3_format(&lfsp, LFS3_F_RDWR, &cfgp) => 0;
@@ -165,8 +165,8 @@ if = [
]
code = '''
// create the previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfs3_format(&lfsp, LFS3_F_RDWR, &cfgp) => 0;
@@ -255,8 +255,8 @@ if = [
]
code = '''
// create the previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfs3_format(&lfsp, LFS3_F_RDWR, &cfgp) => 0;
@@ -372,8 +372,8 @@ if = [
]
code = '''
// create the previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfs3_format(&lfsp, LFS3_F_RDWR, &cfgp) => 0;
@@ -439,8 +439,8 @@ if = [
]
code = '''
// create the previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfs3_format(&lfsp, LFS3_F_RDWR, &cfgp) => 0;
@@ -561,8 +561,8 @@ if = [
]
code = '''
// create the previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfs3_format(&lfsp, LFS3_F_RDWR, &cfgp) => 0;
@@ -724,8 +724,8 @@ code = '''
//////
// now mount with previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfsp_mount(&lfsp, LFSP_M_RDWR, &cfgp) => 0;
@@ -757,8 +757,8 @@ code = '''
//////
// now mount with previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfsp_mount(&lfsp, LFSP_M_RDWR, &cfgp) => 0;
@@ -829,8 +829,8 @@ code = '''
//////
// now mount with previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfsp_mount(&lfsp, LFSP_M_RDWR, &cfgp) => 0;
@@ -922,8 +922,8 @@ code = '''
//////
// now mount with previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfsp_mount(&lfsp, LFSP_M_RDWR, &cfgp) => 0;
@@ -1024,8 +1024,8 @@ code = '''
//////
// now mount with previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfsp_mount(&lfsp, LFSP_M_RDWR, &cfgp) => 0;
@@ -1109,8 +1109,8 @@ code = '''
//////
// now mount with previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfsp_mount(&lfsp, LFSP_M_RDWR, &cfgp) => 0;
@@ -1234,8 +1234,8 @@ code = '''
//////
// now mount with previous version
struct lfsp_config cfgp;
assert(sizeof(struct lfsp_config) == sizeof(struct lfs3_config));
struct lfsp_cfg cfgp;
assert(sizeof(struct lfsp_cfg) == sizeof(struct lfs3_cfg));
memcpy(&cfgp, CFG, sizeof(cfgp));
lfsp_t lfsp;
lfsp_mount(&lfsp, LFSP_M_RDWR, &cfgp) => 0;
+5 -5
View File
@@ -51,7 +51,7 @@ code = '''
}
// configure the filesystem size
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = run_bc[run];
// run the test
@@ -269,7 +269,7 @@ code = '''
}
// configure the filesystem size
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = run_bc[run];
// run the test
@@ -557,7 +557,7 @@ code = '''
}
// configure the filesystem size
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = run_bc[run];
// run the test
@@ -737,7 +737,7 @@ code = '''
}
// configure the filesystem size
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = run_bc[run];
// run the test
@@ -1242,7 +1242,7 @@ code = '''
}
// configure the filesystem size
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = run_bc[run];
// run the test
+12 -12
View File
@@ -26,7 +26,7 @@ defines.BIGGER_BLOCK_COUNT = [
if = 'BIGGER_BLOCK_COUNT > SMALLER_BLOCK_COUNT'
code = '''
// create a smaller fs
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = SMALLER_BLOCK_COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -145,7 +145,7 @@ defines.BIGGER_BLOCK_COUNT = [
if = 'BIGGER_BLOCK_COUNT > SMALLER_BLOCK_COUNT'
code = '''
// create a bigger fs
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = BIGGER_BLOCK_COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -206,7 +206,7 @@ defines.BIGGER_BLOCK_COUNT = [
if = 'BIGGER_BLOCK_COUNT > SMALLER_BLOCK_COUNT'
code = '''
// create a smaller fs
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = SMALLER_BLOCK_COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -321,7 +321,7 @@ defines.SMALLER_BLOCK_COUNT = [
]
code = '''
// create a smaller fs
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = SMALLER_BLOCK_COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -438,7 +438,7 @@ defines.REMOUNT = [false, true]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
code = '''
// start with a small number of blocks
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = INIT_BLOCK_COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -581,7 +581,7 @@ defines.SEED = 'range(10)'
fuzz = 'SEED'
code = '''
// start with a small number of blocks
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = INIT_BLOCK_COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -812,7 +812,7 @@ defines.SIZE = [
if = '(SIZE*N)/BLOCK_SIZE <= 32'
code = '''
// start with a small number of blocks
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = INIT_BLOCK_COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -961,7 +961,7 @@ fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// start with a small number of blocks
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = INIT_BLOCK_COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -1255,7 +1255,7 @@ fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// start with a small number of blocks
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = INIT_BLOCK_COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -1755,7 +1755,7 @@ fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// start with a small number of blocks
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = INIT_BLOCK_COUNT;
lfs3_t lfs3;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
@@ -2369,7 +2369,7 @@ code = '''
int err = lfs3_mount(&lfs3, LFS3_M_RDWR, CFG);
if (err) {
// start with a small number of blocks
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = INIT_BLOCK_COUNT;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
// mount with maximum block count
@@ -2682,7 +2682,7 @@ code = '''
int err = lfs3_mount(&lfs3, LFS3_M_RDWR, CFG);
if (err) {
// start with a small number of blocks
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_count = INIT_BLOCK_COUNT;
lfs3_format(&lfs3, LFS3_F_RDWR, &cfg) => 0;
// mount with maximum block count
+2 -2
View File
@@ -4780,7 +4780,7 @@ code = '''
// switch to early relocations after extending
lfs3_unmount(&lfs3) => 0;
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_recycles = 0;
lfs3_mount(&lfs3, LFS3_M_RDWR, &cfg) => 0;
@@ -4954,7 +4954,7 @@ code = '''
// switch to early relocations after extending
lfs3_unmount(&lfs3) => 0;
struct lfs3_config cfg = *CFG;
struct lfs3_cfg cfg = *CFG;
cfg.block_recycles = 0;
lfs3_mount(&lfs3, LFS3_M_RDWR, &cfg) => 0;