Lines Matching refs:sblk
44 static int sqfs_read_sblk(struct squashfs_super_block **sblk) in sqfs_read_sblk() argument
46 *sblk = malloc_cache_aligned(ctxt.cur_dev->blksz); in sqfs_read_sblk()
47 if (!*sblk) in sqfs_read_sblk()
50 if (sqfs_disk_read(0, 1, *sblk) != 1) { in sqfs_read_sblk()
51 free(*sblk); in sqfs_read_sblk()
52 sblk = NULL; in sqfs_read_sblk()
105 struct squashfs_super_block *sblk = ctxt.sblk; in sqfs_frag_lookup() local
114 if (inode_fragment_index >= get_unaligned_le32(&sblk->fragments)) in sqfs_frag_lookup()
117 start = get_unaligned_le64(&sblk->fragment_table_start) / in sqfs_frag_lookup()
119 n_blks = sqfs_calc_n_blks(sblk->fragment_table_start, in sqfs_frag_lookup()
120 sblk->export_table_start, in sqfs_frag_lookup()
147 sblk->fragment_table_start, &table_offset); in sqfs_frag_lookup()
447 struct squashfs_super_block *sblk = ctxt.sblk; in sqfs_search_dir() local
466 table = sqfs_find_inode(dirs->inode_table, le32_to_cpu(sblk->inodes), in sqfs_search_dir()
467 sblk->inodes, sblk->block_size); in sqfs_search_dir()
522 sblk->inodes, sblk->block_size); in sqfs_search_dir()
689 struct squashfs_super_block *sblk = ctxt.sblk; in sqfs_read_inode_table() local
697 table_size = get_unaligned_le64(&sblk->directory_table_start) - in sqfs_read_inode_table()
698 get_unaligned_le64(&sblk->inode_table_start); in sqfs_read_inode_table()
699 start = get_unaligned_le64(&sblk->inode_table_start) / in sqfs_read_inode_table()
701 n_blks = sqfs_calc_n_blks(sblk->inode_table_start, in sqfs_read_inode_table()
702 sblk->directory_table_start, &table_offset); in sqfs_read_inode_table()
774 struct squashfs_super_block *sblk = ctxt.sblk; in sqfs_read_directory_table() local
784 table_size = get_unaligned_le64(&sblk->fragment_table_start) - in sqfs_read_directory_table()
785 get_unaligned_le64(&sblk->directory_table_start); in sqfs_read_directory_table()
786 start = get_unaligned_le64(&sblk->directory_table_start) / in sqfs_read_directory_table()
788 n_blks = sqfs_calc_n_blks(sblk->directory_table_start, in sqfs_read_directory_table()
789 sblk->fragment_table_start, &table_offset); in sqfs_read_directory_table()
968 struct squashfs_super_block *sblk = ctxt.sblk; in sqfs_readdir() local
1013 ipos = sqfs_find_inode(dirs->inode_table, i_number, sblk->inodes, in sqfs_readdir()
1014 sblk->block_size); in sqfs_readdir()
1081 struct squashfs_super_block *sblk; in sqfs_probe() local
1087 ret = sqfs_read_sblk(&sblk); in sqfs_probe()
1092 if (get_unaligned_le32(&sblk->s_magic) != SQFS_MAGIC_NUMBER) { in sqfs_probe()
1098 ctxt.sblk = sblk; in sqfs_probe()
1108 free(ctxt.sblk); in sqfs_probe()
1109 ctxt.sblk = NULL; in sqfs_probe()
1315 struct squashfs_super_block *sblk = ctxt.sblk; in sqfs_read() local
1368 ipos = sqfs_find_inode(dirs->inode_table, i_number, sblk->inodes, in sqfs_read()
1369 sblk->block_size); in sqfs_read()
1376 sblk->block_size); in sqfs_read()
1389 sblk->block_size); in sqfs_read()
1433 datablock = malloc(get_unaligned_le32(&sblk->block_size)); in sqfs_read()
1478 sparse_size = get_unaligned_le32(&sblk->block_size); in sqfs_read()
1484 dest_len = get_unaligned_le32(&sblk->block_size); in sqfs_read()
1535 dest_len = get_unaligned_le32(&sblk->block_size); in sqfs_read()
1582 struct squashfs_super_block *sblk = ctxt.sblk; in sqfs_size() local
1623 ipos = sqfs_find_inode(dirs->inode_table, i_number, sblk->inodes, in sqfs_size()
1624 sblk->block_size); in sqfs_size()
1710 free(ctxt.sblk); in sqfs_close()
1711 ctxt.sblk = NULL; in sqfs_close()