• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/src/router/squashfs-4.2/

Lines Matching defs:sBlk

119 	struct squashfs_super_block *sBlk, union squashfs_inode_header *dir_inode,
194 inode.file_size % sBlk->block_size;
197 + sBlk->block_size - 1) >>
198 sBlk->block_log : inode.file_size >>
199 sBlk->block_log;
247 inode.file_size % sBlk->block_size;
250 sBlk->block_size - 1) >>
251 sBlk->block_log : inode.file_size >>
252 sBlk->block_log;
375 struct compressor *read_super(int fd, struct squashfs_super_block *sBlk, char *source)
381 sBlk);
385 SQUASHFS_INSWAP_SUPER_BLOCK(sBlk);
387 if(sBlk->s_magic != SQUASHFS_MAGIC) {
388 if(sBlk->s_magic == SQUASHFS_MAGIC_SWAP)
398 if(sBlk->s_major != SQUASHFS_MAJOR || sBlk->s_minor > SQUASHFS_MINOR) {
399 if(sBlk->s_major < 4)
404 sBlk->s_major,
405 sBlk->s_minor, sBlk->s_major, sBlk->s_minor);
409 source, sBlk->s_major, sBlk->s_minor);
414 comp = lookup_compressor_id(sBlk->compression);
434 if(SQUASHFS_COMP_OPTS(sBlk->flags)) {
435 bytes = read_block(fd, sizeof(*sBlk), NULL, buffer);
441 res = compressor_extract_options(comp, sBlk->block_size, buffer, bytes);
448 SQUASHFS_EXPORTABLE(sBlk->flags) ? "exportable " : "", source);
451 SQUASHFS_UNCOMPRESSED_INODES(sBlk->flags) ? "un" : "");
453 SQUASHFS_UNCOMPRESSED_DATA(sBlk->flags) ? "un" : "");
455 SQUASHFS_UNCOMPRESSED_FRAGMENTS(sBlk->flags) ? "un" : "");
457 SQUASHFS_UNCOMPRESSED_XATTRS(sBlk->flags) ? "un" : "");
459 SQUASHFS_NO_FRAGMENTS(sBlk->flags) ? "not " : "");
461 SQUASHFS_ALWAYS_FRAGMENTS(sBlk->flags) ? "" : "not ");
463 SQUASHFS_DUPLICATES(sBlk->flags) ? "" : "not ");
465 SQUASHFS_NO_XATTRS(sBlk->flags) ? "not " : "");
467 sBlk->bytes_used / 1024.0, sBlk->bytes_used
469 printf("\tBlock size %d\n", sBlk->block_size);
470 printf("\tNumber of fragments %d\n", sBlk->fragments);
471 printf("\tNumber of inodes %d\n", sBlk->inodes);
472 printf("\tNumber of ids %d\n", sBlk->no_ids);
473 TRACE("sBlk->inode_table_start %llx\n", sBlk->inode_table_start);
474 TRACE("sBlk->directory_table_start %llx\n",
475 sBlk->directory_table_start);
476 TRACE("sBlk->id_table_start %llx\n", sBlk->id_table_start);
477 TRACE("sBlk->fragment_table_start %llx\n", sBlk->fragment_table_start);
478 TRACE("sBlk->lookup_table_start %llx\n", sBlk->lookup_table_start);
479 TRACE("sBlk->xattr_id_table_start %llx\n", sBlk->xattr_id_table_start);
491 unsigned int *last_directory_block, struct squashfs_super_block *sBlk,
500 long long start = sBlk->directory_table_start + directory_start_block,
552 sBlk->directory_table_start;
557 unsigned int *read_id_table(int fd, struct squashfs_super_block *sBlk)
559 int indexes = SQUASHFS_ID_BLOCKS(sBlk->no_ids);
561 int bytes = SQUASHFS_ID_BYTES(sBlk->no_ids);
571 res = read_fs_bytes(fd, sBlk->id_table_start,
572 SQUASHFS_ID_BLOCK_BYTES(sBlk->no_ids), index);
594 SQUASHFS_INSWAP_INTS(id_table, sBlk->no_ids);
596 for(i = 0; i < sBlk->no_ids; i++) {
605 int read_fragment_table(int fd, struct squashfs_super_block *sBlk,
608 int res, i, indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk->fragments);
612 "from 0x%llx\n", sBlk->fragments, indexes,
613 sBlk->fragment_table_start);
614 if(sBlk->fragments == 0)
617 *fragment_table = malloc(sBlk->fragments *
624 res = read_fs_bytes(fd, sBlk->fragment_table_start,
625 SQUASHFS_FRAGMENT_INDEX_BYTES(sBlk->fragments),
649 for(i = 0; i < sBlk->fragments; i++)
656 int read_inode_lookup_table(int fd, struct squashfs_super_block *sBlk,
659 int lookup_bytes = SQUASHFS_LOOKUP_BYTES(sBlk->inodes);
660 int indexes = SQUASHFS_LOOKUP_BLOCKS(sBlk->inodes);
664 if(sBlk->lookup_table_start == SQUASHFS_INVALID_BLK)
673 res = read_fs_bytes(fd, sBlk->lookup_table_start,
674 SQUASHFS_LOOKUP_BLOCK_BYTES(sBlk->inodes), index);
697 SQUASHFS_INSWAP_LONG_LONGS(*inode_lookup_table, sBlk->inodes);
703 long long read_filesystem(char *root_name, int fd, struct squashfs_super_block *sBlk,
718 long long start = sBlk->inode_table_start;
719 long long end = sBlk->directory_table_start;
721 SQUASHFS_INODE_BLK(sBlk->root_inode);
723 SQUASHFS_INODE_OFFSET(sBlk->root_inode);
731 if(get_xattrs(fd, sBlk) == 0)
734 if(read_fragment_table(fd, sBlk, fragment_table) == 0)
737 if(read_inode_lookup_table(fd, sBlk, inode_lookup_table) == 0)
740 id_table = read_id_table(fd, sBlk);
745 root_inode_offset, sBlk, &inode, &inode_table,
774 *inode_dir_file_size, last_directory_block, sBlk,
799 res = read_fs_bytes(fd, sBlk->directory_table_start,
824 return sBlk->inode_table_start;