• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/busybox/e2fsprogs/old_e2fsprogs/

Lines Matching refs:outdir

10393 static errcode_t alloc_size_dir(ext2_filsys fs, struct out_dir *outdir,
10398 if (outdir->max) {
10399 new_mem = xrealloc(outdir->buf, blocks * fs->blocksize);
10400 outdir->buf = new_mem;
10401 new_mem = xrealloc(outdir->hashes,
10403 outdir->hashes = new_mem;
10405 outdir->buf = xmalloc(blocks * fs->blocksize);
10406 outdir->hashes = xmalloc(blocks * sizeof(ext2_dirhash_t));
10407 outdir->num = 0;
10409 outdir->max = blocks;
10413 static void free_out_dir(struct out_dir *outdir)
10415 free(outdir->buf);
10416 free(outdir->hashes);
10417 outdir->max = 0;
10418 outdir->num =0;
10421 static errcode_t get_next_block(ext2_filsys fs, struct out_dir *outdir,
10426 if (outdir->num >= outdir->max) {
10427 retval = alloc_size_dir(fs, outdir, outdir->max + 50);
10431 *ret = outdir->buf + (outdir->num++ * fs->blocksize);
10560 struct out_dir *outdir)
10570 outdir->max = 0;
10571 retval = alloc_size_dir(fs, outdir,
10575 outdir->num = fd->compress ? 0 : 1;
10577 outdir->hashes[0] = 0;
10579 if ((retval = get_next_block(fs, outdir, &block_start)))
10591 if ((retval = get_next_block(fs, outdir,
10600 outdir->hashes[outdir->num-1] = ent->hash | 1;
10602 outdir->hashes[outdir->num-1] = ent->hash;
10682 * outdir, and populates the root node and any necessary interior nodes.
10685 struct out_dir *outdir,
10697 root_info = set_root_node(fs, outdir->buf, ino, parent);
10698 root_offset = limit_offset = ((char *) root_info - outdir->buf) +
10700 root_limit = (struct ext2_dx_countlimit *) (outdir->buf + limit_offset);
10702 nblks = outdir->num;
10707 root = (struct ext2_dx_entry *) (outdir->buf + root_offset);
10712 ext2fs_cpu_to_le32(outdir->hashes[i]);
10728 (outdir->buf + root_offset);
10729 root->block = ext2fs_cpu_to_le32(outdir->num);
10732 ext2fs_cpu_to_le32(outdir->hashes[i]);
10733 if ((retval = get_next_block(fs, outdir,
10745 ext2fs_cpu_to_le32(outdir->hashes[i]);
10752 root_limit = (struct ext2_dx_countlimit *) (outdir->buf + limit_offset);
10760 struct out_dir *outdir;
10782 if (blockcnt >= wd->outdir->num) {
10794 dir = wd->outdir->buf + (blockcnt * fs->blocksize);
10802 struct out_dir *outdir,
10809 retval = e2fsck_expand_directory(ctx, ino, -1, outdir->num);
10813 wd.outdir = outdir;
10830 inode.i_size = outdir->num * fs->blocksize;
10844 struct out_dir outdir;
10846 outdir.max = outdir.num = 0;
10847 outdir.buf = 0;
10848 outdir.hashes = 0;
10902 retval = copy_dir_entries(fs, &fd, &outdir);
10910 retval = calculate_tree(fs, &outdir, ino, fd.parent);
10915 retval = write_directory(ctx, fs, &outdir, ino, fd.compress);
10921 free_out_dir(&outdir);