Lines Matching refs:ino

128   struct grub_squash_inode ino;
198 struct grub_squash_cache_inode ino;
212 struct grub_squash_inode ino;
456 ret = grub_malloc (grub_le_to_cpu32 (node->ino.symlink.namelen) + 1);
459 grub_le_to_cpu32 (node->ino.symlink.namelen),
462 node->ino_offset + (node->ino.symlink.name
463 - (char *) &node->ino));
469 ret[grub_le_to_cpu32 (node->ino.symlink.namelen)] = 0;
486 switch (dir->ino.type)
489 off = grub_le_to_cpu16 (dir->ino.dir.offset);
490 endoff = grub_le_to_cpu16 (dir->ino.dir.size) + off - 3;
491 chunk = grub_le_to_cpu32 (dir->ino.dir.chunk);
494 off = grub_le_to_cpu16 (dir->ino.long_dir.offset);
495 endoff = grub_le_to_cpu16 (dir->ino.long_dir.size) + off - 3;
496 chunk = grub_le_to_cpu32 (dir->ino.long_dir.chunk);
499 grub_error (GRUB_ERR_BAD_FS, "unexpected ino type 0x%x",
500 grub_le_to_cpu16 (dir->ino.type));
522 struct grub_squash_inode ino;
531 err = read_chunk (dir->data, &ino, sizeof (ino),
559 node->ino = ino;
579 return read_chunk (data, &root->ino, sizeof (root->ino),
591 grub_free (data->ino.cumulated_block_sizes);
592 grub_free (data->ino.block_sizes);
614 info.mtime = grub_le_to_cpu32 (node->ino.mtime);
667 data->ino.ino = fdiro->ino;
668 data->ino.block_sizes = NULL;
669 data->ino.cumulated_block_sizes = NULL;
670 data->ino.ino_chunk = fdiro->ino_chunk;
671 data->ino.ino_offset = fdiro->ino_offset;
673 switch (fdiro->ino.type)
676 file->size = grub_le_to_cpu64 (fdiro->ino.long_file.size);
679 file->size = grub_le_to_cpu32 (fdiro->ino.file.size);
683 grub_uint16_t type = grub_le_to_cpu16 (fdiro->ino.type);
686 return grub_error (GRUB_ERR_BAD_FS, "unexpected ino type 0x%x", type);
697 struct grub_squash_cache_inode *ino,
706 switch (ino->ino.type)
709 a = grub_le_to_cpu64 (ino->ino.long_file.chunk);
712 a = grub_le_to_cpu32 (ino->ino.file.chunk);
716 if (!ino->block_sizes)
721 switch (ino->ino.type)
724 total_size = grub_le_to_cpu64 (ino->ino.long_file.size);
725 block_offset = ((char *) &ino->ino.long_file.block_size
726 - (char *) &ino->ino);
729 total_size = grub_le_to_cpu32 (ino->ino.file.size);
730 block_offset = ((char *) &ino->ino.file.block_size
731 - (char *) &ino->ino);
735 ino->block_sizes = grub_malloc (total_blocks
736 * sizeof (ino->block_sizes[0]));
737 ino->cumulated_block_sizes = grub_malloc (total_blocks
738 * sizeof (ino->cumulated_block_sizes[0]));
739 if (!ino->block_sizes || !ino->cumulated_block_sizes)
741 grub_free (ino->block_sizes);
742 grub_free (ino->cumulated_block_sizes);
743 ino->block_sizes = 0;
744 ino->cumulated_block_sizes = 0;
747 err = read_chunk (data, ino->block_sizes,
748 total_blocks * sizeof (ino->block_sizes[0]),
750 + ino->ino_chunk,
751 ino->ino_offset + block_offset);
754 grub_free (ino->block_sizes);
755 grub_free (ino->cumulated_block_sizes);
756 ino->block_sizes = 0;
757 ino->cumulated_block_sizes = 0;
760 ino->cumulated_block_sizes[0] = 0;
762 ino->cumulated_block_sizes[i] = ino->cumulated_block_sizes[i - 1]
763 + (grub_le_to_cpu32 (ino->block_sizes[i - 1]) & ~SQUASH_BLOCK_FLAGS);
777 if (!(ino->block_sizes[i]
785 (ino->cumulated_block_sizes[i] + a)
787 (ino->cumulated_block_sizes[i] + a)
807 (ino->cumulated_block_sizes[i] + a + boff)
809 (ino->cumulated_block_sizes[i] + a + boff)
826 struct grub_squash_cache_inode *ino,
835 switch (ino->ino.type)
838 a = grub_le_to_cpu64 (ino->ino.long_file.chunk);
839 fragment = grub_le_to_cpu32 (ino->ino.long_file.fragment);
842 a = grub_le_to_cpu32 (ino->ino.file.chunk);
843 fragment = grub_le_to_cpu32 (ino->ino.file.fragment);
848 return direct_read (data, ino, off, buf, len);
856 if (ino->ino.type == grub_cpu_to_le16_compile_time (SQUASH_TYPE_LONG_REGULAR))
857 b = grub_le_to_cpu64 (ino->ino.long_file.offset) + off;
859 b = grub_le_to_cpu32 (ino->ino.file.offset) + off;
902 return grub_squash_read_data (data, &data->ino,