Renamed lfsr_attr_t -> lfsr_rattr_t
To avoid the obvious conflict with lfs_attr. Unlike lfsr_rattr_t, lfs_attr is user facing, so it gets priority. This name may change in the future if something better comes up, but in the meantime we need to change the name to _something_. Is this the reason Linux/BSD/etc call these xattrs? (Note littlefs's attrs are much more limited than xattrs. We should _not_ call these xattrs in case we want to add true xattrs in the future.)
This commit is contained in:
@@ -74,8 +74,8 @@ code = '''
|
||||
lfs_size_t bid = TEST_PRNG(&prng) % (sim_size+1);
|
||||
|
||||
// add to btree
|
||||
lfsr_btree_commit(&lfs, &btree, bid, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_btree_commit(&lfs, &btree, bid, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_DATA, +1,
|
||||
LFSR_DATA_BUF(&(uint8_t){'a'+(i % 26)}, 1)))) => 0;
|
||||
|
||||
@@ -1848,8 +1848,8 @@ code = '''
|
||||
lfs_size_t bid = TEST_PRNG(&prng) % (sim_size+1);
|
||||
|
||||
// add to btree
|
||||
lfsr_btree_commit(&lfs, &btree, bid, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_btree_commit(&lfs, &btree, bid, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_DATA, +1,
|
||||
LFSR_DATA_BUF(&(uint8_t){'a'+(i % 26)}, 1)))) => 0;
|
||||
|
||||
@@ -3622,8 +3622,8 @@ code = '''
|
||||
lfs_size_t bid = TEST_PRNG(&prng) % (sim_size+1);
|
||||
|
||||
// add to btree
|
||||
lfsr_btree_commit(&lfs, &btree, bid, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_btree_commit(&lfs, &btree, bid, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_DATA, +1,
|
||||
LFSR_DATA_BUF(&(uint8_t){'a'+(i % 26)}, 1)))) => 0;
|
||||
|
||||
|
||||
+297
-297
File diff suppressed because it is too large
Load Diff
+32
-32
@@ -515,8 +515,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_RM | LFSR_TAG_MAGIC, 0,
|
||||
LFSR_DATA_NULL()))) => 0;
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
@@ -539,8 +539,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_MAGIC, 0,
|
||||
LFSR_DATA_BUF("lottlefs", 8)))) => 0;
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
@@ -563,8 +563,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_VERSION, 0,
|
||||
LFSR_DATA_BUF(((const uint8_t[2]){
|
||||
LFS_DISK_VERSION_MAJOR+1,
|
||||
@@ -589,8 +589,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_VERSION, 0,
|
||||
LFSR_DATA_BUF(((const uint8_t[2]){
|
||||
LFS_DISK_VERSION_MAJOR,
|
||||
@@ -616,8 +616,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_RCOMPAT, 0,
|
||||
LFSR_DATA_RCOMPAT(
|
||||
LFSR_RCOMPAT_COMPAT
|
||||
@@ -643,8 +643,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_WCOMPAT, 0,
|
||||
LFSR_DATA_WCOMPAT(
|
||||
LFSR_WCOMPAT_COMPAT
|
||||
@@ -673,8 +673,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_OCOMPAT, 0,
|
||||
LFSR_DATA_OCOMPAT(
|
||||
LFSR_OCOMPAT_COMPAT
|
||||
@@ -701,8 +701,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR_CAT(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR_CAT(
|
||||
LFSR_TAG_RCOMPAT, 0,
|
||||
LFSR_DATA_RCOMPAT(LFSR_RCOMPAT_COMPAT),
|
||||
LFSR_DATA_BUF("\x00\x00\x00\x00\x80", 5)))) => 0;
|
||||
@@ -725,8 +725,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR_CAT(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR_CAT(
|
||||
LFSR_TAG_WCOMPAT, 0,
|
||||
LFSR_DATA_WCOMPAT(LFSR_WCOMPAT_COMPAT),
|
||||
LFSR_DATA_BUF("\x00\x00\x00\x00\x80", 5)))) => 0;
|
||||
@@ -752,8 +752,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR_CAT(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR_CAT(
|
||||
LFSR_TAG_OCOMPAT, 0,
|
||||
LFSR_DATA_OCOMPAT(LFSR_OCOMPAT_COMPAT),
|
||||
LFSR_DATA_BUF("\x00\x00\x00\x00\x80", 5)))) => 0;
|
||||
@@ -780,8 +780,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_GEOMETRY, 0,
|
||||
LFSR_DATA_GEOMETRY((&(lfsr_geometry_t){
|
||||
INC_BLOCK_SIZE,
|
||||
@@ -807,8 +807,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_GEOMETRY, 0,
|
||||
LFSR_DATA_GEOMETRY((&(lfsr_geometry_t){
|
||||
BLOCK_SIZE,
|
||||
@@ -834,8 +834,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_NAMELIMIT, 0,
|
||||
LFSR_DATA_LLEB128(INC_NAME_LIMIT)))) => 0;
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
@@ -858,8 +858,8 @@ code = '''
|
||||
// note we're messing around with internals to do this! this
|
||||
// is not a user API
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR_CAT(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR_CAT(
|
||||
LFSR_TAG_FILELIMIT, 0,
|
||||
// it's a bit difficult to test this since file limit
|
||||
// is usually our integer limit, but we can force a
|
||||
@@ -884,8 +884,8 @@ code = '''
|
||||
|
||||
// create an unknown config
|
||||
lfsr_mount(&lfs, LFS_M_RDWR, CFG) => 0;
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
|
||||
LFSR_ATTR(
|
||||
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATTRS(
|
||||
LFSR_RATTR(
|
||||
LFSR_TAG_CONFIG + 0x13, 0,
|
||||
LFSR_DATA_BUF("oh no!", strlen("oh no!"))))) => 0;
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
@@ -932,8 +932,8 @@ code = '''
|
||||
lfsr_mtree_pathlookup(&lfs, "b",
|
||||
&mdir, NULL,
|
||||
&did, &name, &name_size) => LFS_ERR_EXIST;
|
||||
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
|
||||
LFSR_ATTR_NAME(
|
||||
lfsr_mdir_commit(&lfs, &mdir, LFSR_RATTRS(
|
||||
LFSR_RATTR_NAME(
|
||||
LFSR_TAG_SUB | (LFSR_TAG_NAME + 0x13), 0,
|
||||
did, name, name_size))) => 0;
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
|
||||
+322
-322
File diff suppressed because it is too large
Load Diff
+1274
-1272
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user