• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/router/busybox-1.x/e2fsprogs/old_e2fsprogs/

Lines Matching refs:outdir

10353 static errcode_t alloc_size_dir(ext2_filsys fs, struct out_dir *outdir,
10358 if (outdir->max) {
10359 new_mem = realloc(outdir->buf, blocks * fs->blocksize);
10362 outdir->buf = new_mem;
10363 new_mem = realloc(outdir->hashes,
10367 outdir->hashes = new_mem;
10369 outdir->buf = malloc(blocks * fs->blocksize);
10370 outdir->hashes = malloc(blocks * sizeof(ext2_dirhash_t));
10371 outdir->num = 0;
10373 outdir->max = blocks;
10377 static void free_out_dir(struct out_dir *outdir)
10379 free(outdir->buf);
10380 free(outdir->hashes);
10381 outdir->max = 0;
10382 outdir->num =0;
10385 static errcode_t get_next_block(ext2_filsys fs, struct out_dir *outdir,
10390 if (outdir->num >= outdir->max) {
10391 retval = alloc_size_dir(fs, outdir, outdir->max + 50);
10395 *ret = outdir->buf + (outdir->num++ * fs->blocksize);
10524 struct out_dir *outdir)
10534 outdir->max = 0;
10535 retval = alloc_size_dir(fs, outdir,
10539 outdir->num = fd->compress ? 0 : 1;
10541 outdir->hashes[0] = 0;
10543 if ((retval = get_next_block(fs, outdir, &block_start)))
10555 if ((retval = get_next_block(fs, outdir,
10564 outdir->hashes[outdir->num-1] = ent->hash | 1;
10566 outdir->hashes[outdir->num-1] = ent->hash;
10646 * outdir, and populates the root node and any necessary interior nodes.
10649 struct out_dir *outdir,
10661 root_info = set_root_node(fs, outdir->buf, ino, parent);
10662 root_offset = limit_offset = ((char *) root_info - outdir->buf) +
10664 root_limit = (struct ext2_dx_countlimit *) (outdir->buf + limit_offset);
10666 nblks = outdir->num;
10671 root = (struct ext2_dx_entry *) (outdir->buf + root_offset);
10676 ext2fs_cpu_to_le32(outdir->hashes[i]);
10692 (outdir->buf + root_offset);
10693 root->block = ext2fs_cpu_to_le32(outdir->num);
10696 ext2fs_cpu_to_le32(outdir->hashes[i]);
10697 if ((retval = get_next_block(fs, outdir,
10709 ext2fs_cpu_to_le32(outdir->hashes[i]);
10716 root_limit = (struct ext2_dx_countlimit *) (outdir->buf + limit_offset);
10724 struct out_dir *outdir;
10746 if (blockcnt >= wd->outdir->num) {
10758 dir = wd->outdir->buf + (blockcnt * fs->blocksize);
10766 struct out_dir *outdir,
10773 retval = e2fsck_expand_directory(ctx, ino, -1, outdir->num);
10777 wd.outdir = outdir;
10794 inode.i_size = outdir->num * fs->blocksize;
10808 struct out_dir outdir;
10810 outdir.max = outdir.num = 0;
10811 outdir.buf = 0;
10812 outdir.hashes = 0;
10870 retval = copy_dir_entries(fs, &fd, &outdir);
10878 retval = calculate_tree(fs, &outdir, ino, fd.parent);
10883 retval = write_directory(ctx, fs, &outdir, ino, fd.compress);
10889 free_out_dir(&outdir);