Lines Matching refs:superblock
411 static inline void lfs_superblock_fromle32(lfs_superblock_t *superblock) { in lfs_superblock_fromle32() argument
412 superblock->version = lfs_fromle32(superblock->version); in lfs_superblock_fromle32()
413 superblock->block_size = lfs_fromle32(superblock->block_size); in lfs_superblock_fromle32()
414 superblock->block_count = lfs_fromle32(superblock->block_count); in lfs_superblock_fromle32()
415 superblock->name_max = lfs_fromle32(superblock->name_max); in lfs_superblock_fromle32()
416 superblock->file_max = lfs_fromle32(superblock->file_max); in lfs_superblock_fromle32()
417 superblock->attr_max = lfs_fromle32(superblock->attr_max); in lfs_superblock_fromle32()
420 static inline void lfs_superblock_tole32(lfs_superblock_t *superblock) { in lfs_superblock_tole32() argument
421 superblock->version = lfs_tole32(superblock->version); in lfs_superblock_tole32()
422 superblock->block_size = lfs_tole32(superblock->block_size); in lfs_superblock_tole32()
423 superblock->block_count = lfs_tole32(superblock->block_count); in lfs_superblock_tole32()
424 superblock->name_max = lfs_tole32(superblock->name_max); in lfs_superblock_tole32()
425 superblock->file_max = lfs_tole32(superblock->file_max); in lfs_superblock_tole32()
426 superblock->attr_max = lfs_tole32(superblock->attr_max); in lfs_superblock_tole32()
3634 lfs_superblock_t superblock = { local
3643 lfs_superblock_tole32(&superblock);
3647 {LFS_MKTAG(LFS_TYPE_INLINESTRUCT, 0, sizeof(superblock)),
3648 &superblock}));
3711 lfs_superblock_t superblock; local
3713 LFS_MKTAG(LFS_TYPE_INLINESTRUCT, 0, sizeof(superblock)),
3714 &superblock);
3719 lfs_superblock_fromle32(&superblock);
3722 uint16_t major_version = (0xffff & (superblock.version >> 16));
3723 uint16_t minor_version = (0xffff & (superblock.version >> 0));
3733 if (superblock.name_max) {
3734 if (superblock.name_max > lfs->name_max) {
3736 superblock.name_max, lfs->name_max);
3741 lfs->name_max = superblock.name_max;
3744 if (superblock.file_max) {
3745 if (superblock.file_max > lfs->file_max) {
3747 superblock.file_max, lfs->file_max);
3752 lfs->file_max = superblock.file_max;
3755 if (superblock.attr_max) {
3756 if (superblock.attr_max > lfs->attr_max) {
3758 superblock.attr_max, lfs->attr_max);
3763 lfs->attr_max = superblock.attr_max;
4629 lfs1_superblock_t superblock; local
4637 &superblock.d, sizeof(superblock.d));
4638 lfs1_superblock_fromle32(&superblock.d);
4643 lfs->lfs1->root[0] = superblock.d.root[0];
4644 lfs->lfs1->root[1] = superblock.d.root[1];
4647 if (err || memcmp(superblock.d.magic, "littlefs", 8) != 0) {
4654 uint16_t major_version = (0xffff & (superblock.d.version >> 16));
4655 uint16_t minor_version = (0xffff & (superblock.d.version >> 0));
4861 lfs_superblock_t superblock = { local
4870 lfs_superblock_tole32(&superblock);
4874 {LFS_MKTAG(LFS_TYPE_INLINESTRUCT, 0, sizeof(superblock)),
4875 &superblock}));