Renamed lfsr_rattr_t -> lfsr_rat_t

We already have lfsr_cat_t so...

lfsr_rattr_t is a pretty fundamental type for littlefs, unfortunately
the name "rattr" is a mouthful. Shortening this to just "rat" hopefully
makes things easier to read at the cost of it being a bit less clear
what lfsr_rat_t actually is.

Though it's possible I've been staring at the dwarf spec (DW_AT_*) for
too long...
This commit is contained in:
Christopher Haster
2024-12-27 00:28:53 -06:00
parent 62cc4dbb14
commit 11115dbe81
7 changed files with 2323 additions and 2323 deletions
+393 -393
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -826,7 +826,7 @@ typedef struct lfs {
lfs_off_t file_limit;
int8_t recycle_bits;
uint8_t rattr_estimate;
uint8_t rat_estimate;
uint8_t mdir_bits;
// linked-list of opened mdirs
+6 -6
View File
@@ -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_RATTRS(
LFSR_RATTR(
lfsr_btree_commit(&lfs, &btree, bid, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR(
lfsr_btree_commit(&lfs, &btree, bid, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR(
lfsr_btree_commit(&lfs, &btree, bid, LFSR_RATS(
LFSR_RAT(
LFSR_TAG_DATA, +1,
LFSR_DATA_BUF(&(uint8_t){'a'+(i % 26)}, 1)))) => 0;
+297 -297
View File
File diff suppressed because it is too large Load Diff
+32 -32
View File
@@ -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_RATTRS(
LFSR_RATTR(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR_CAT(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT_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_RATTRS(
LFSR_RATTR_CAT(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT_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_RATTRS(
LFSR_RATTR_CAT(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT_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_RATTRS(
LFSR_RATTR(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT(
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_RATTRS(
LFSR_RATTR_CAT(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT_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_RATTRS(
LFSR_RATTR(
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_RATS(
LFSR_RAT(
LFSR_TAG_CONFIG + 0x13, 0,
LFSR_DATA_BUF("oh no!", strlen("oh no!"))))) => 0;
lfsr_unmount(&lfs) => 0;
@@ -930,8 +930,8 @@ code = '''
lfsr_did_t did;
lfsr_mtree_pathlookup(&lfs, &path,
&mdir, NULL, &did) => 0;
lfsr_mdir_commit(&lfs, &mdir, LFSR_RATTRS(
LFSR_RATTR_NAME(
lfsr_mdir_commit(&lfs, &mdir, LFSR_RATS(
LFSR_RAT_NAME(
LFSR_TAG_SUB | (LFSR_TAG_NAME + 0x13), 0,
did, path, lfsr_path_namelen(path)))) => 0;
lfsr_unmount(&lfs) => 0;
+322 -322
View File
File diff suppressed because it is too large Load Diff
+1272 -1272
View File
File diff suppressed because it is too large Load Diff