/external/e2fsprogs/lib/ext2fs/ |
D | openfs.c | 35 blk64_t ext2fs_descriptor_block_loc2(ext2_filsys fs, blk64_t group_block, in ext2fs_descriptor_block_loc2() argument 42 if (!(fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) || in ext2fs_descriptor_block_loc2() 43 (i < fs->super->s_first_meta_bg)) in ext2fs_descriptor_block_loc2() 46 bg = EXT2_DESC_PER_BLOCK(fs->super) * i; in ext2fs_descriptor_block_loc2() 47 if (ext2fs_bg_has_super(fs, bg)) in ext2fs_descriptor_block_loc2() 49 ret_blk = ext2fs_group_first_block2(fs, bg) + has_super; in ext2fs_descriptor_block_loc2() 58 if (group_block != fs->super->s_first_data_block && in ext2fs_descriptor_block_loc2() 59 ((ret_blk + fs->super->s_blocks_per_group) < in ext2fs_descriptor_block_loc2() 60 ext2fs_blocks_count(fs->super))) in ext2fs_descriptor_block_loc2() 61 ret_blk += fs->super->s_blocks_per_group; in ext2fs_descriptor_block_loc2() [all …]
|
D | rw_bitmaps.c | 30 static errcode_t write_bitmaps(ext2_filsys fs, int do_inode, int do_block) in write_bitmaps() argument 40 blk64_t blk_itr = EXT2FS_B2C(fs, fs->super->s_first_data_block); in write_bitmaps() 43 EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS); in write_bitmaps() 45 if (!(fs->flags & EXT2_FLAG_RW)) in write_bitmaps() 48 if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super, in write_bitmaps() 54 block_nbytes = EXT2_CLUSTERS_PER_GROUP(fs->super) / 8; in write_bitmaps() 55 retval = io_channel_alloc_buf(fs->io, 0, &block_buf); in write_bitmaps() 58 memset(block_buf, 0xff, fs->blocksize); in write_bitmaps() 62 ((EXT2_INODES_PER_GROUP(fs->super)+7) / 8); in write_bitmaps() 63 retval = io_channel_alloc_buf(fs->io, 0, &inode_buf); in write_bitmaps() [all …]
|
D | mmp.c | 33 errcode_t ext2fs_mmp_read(ext2_filsys fs, blk64_t mmp_blk, void *buf) in ext2fs_mmp_read() argument 38 if ((mmp_blk <= fs->super->s_first_data_block) || in ext2fs_mmp_read() 39 (mmp_blk >= ext2fs_blocks_count(fs->super))) in ext2fs_mmp_read() 47 if (fs->mmp_fd <= 0) { in ext2fs_mmp_read() 48 fs->mmp_fd = open(fs->device_name, O_RDWR | O_DIRECT); in ext2fs_mmp_read() 49 if (fs->mmp_fd < 0) { in ext2fs_mmp_read() 55 if (fs->mmp_cmp == NULL) { in ext2fs_mmp_read() 56 int align = ext2fs_get_dio_alignment(fs->mmp_fd); in ext2fs_mmp_read() 58 retval = ext2fs_get_memalign(fs->blocksize, align, in ext2fs_mmp_read() 59 &fs->mmp_cmp); in ext2fs_mmp_read() [all …]
|
D | closefs.c | 35 int ext2fs_bg_has_super(ext2_filsys fs, dgrp_t group) in ext2fs_bg_has_super() argument 37 if (!(fs->super->s_feature_ro_compat & in ext2fs_bg_has_super() 63 errcode_t ext2fs_super_and_bgd_loc2(ext2_filsys fs, in ext2fs_super_and_bgd_loc2() argument 76 group_block = ext2fs_group_first_block2(fs, group); in ext2fs_super_and_bgd_loc2() 77 if (group_block == 0 && fs->blocksize == 1024) in ext2fs_super_and_bgd_loc2() 80 if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) in ext2fs_super_and_bgd_loc2() 81 old_desc_blocks = fs->super->s_first_meta_bg; in ext2fs_super_and_bgd_loc2() 84 fs->desc_blocks + fs->super->s_reserved_gdt_blocks; in ext2fs_super_and_bgd_loc2() 86 has_super = ext2fs_bg_has_super(fs, group); in ext2fs_super_and_bgd_loc2() 92 meta_bg_size = EXT2_DESC_PER_BLOCK(fs->super); in ext2fs_super_and_bgd_loc2() [all …]
|
D | alloc_tables.c | 37 static blk64_t flexbg_offset(ext2_filsys fs, dgrp_t group, blk64_t start_blk, in flexbg_offset() argument 45 flexbg_size = 1 << fs->super->s_log_groups_per_flex; in flexbg_offset() 49 if (size > (int) (fs->super->s_blocks_per_group / 8)) in flexbg_offset() 50 size = (int) fs->super->s_blocks_per_group / 8; in flexbg_offset() 60 start_blk = ext2fs_group_first_block2(fs, flexbg_size * flexbg); in flexbg_offset() 62 if (last_grp > fs->group_desc_count-1) in flexbg_offset() 63 last_grp = fs->group_desc_count-1; in flexbg_offset() 64 last_blk = ext2fs_group_last_block2(fs, last_grp); in flexbg_offset() 67 if (ext2fs_get_free_blocks2(fs, start_blk, last_blk, size, in flexbg_offset() 71 if (ext2fs_get_free_blocks2(fs, start_blk, last_blk, elem_size, in flexbg_offset() [all …]
|
D | alloc_stats.c | 17 void ext2fs_inode_alloc_stats2(ext2_filsys fs, ext2_ino_t ino, in ext2fs_inode_alloc_stats2() argument 20 int group = ext2fs_group_of_ino(fs, ino); in ext2fs_inode_alloc_stats2() 23 if (ino > fs->super->s_inodes_count) { in ext2fs_inode_alloc_stats2() 30 ext2fs_mark_inode_bitmap2(fs->inode_map, ino); in ext2fs_inode_alloc_stats2() 32 ext2fs_unmark_inode_bitmap2(fs->inode_map, ino); in ext2fs_inode_alloc_stats2() 33 ext2fs_bg_free_inodes_count_set(fs, group, ext2fs_bg_free_inodes_count(fs, group) - inuse); in ext2fs_inode_alloc_stats2() 35 ext2fs_bg_used_dirs_count_set(fs, group, ext2fs_bg_used_dirs_count(fs, group) + inuse); in ext2fs_inode_alloc_stats2() 39 ext2fs_bg_flags_clear(fs, group, EXT2_BG_INODE_UNINIT); in ext2fs_inode_alloc_stats2() 40 if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super, in ext2fs_inode_alloc_stats2() 42 ext2_ino_t first_unused_inode = fs->super->s_inodes_per_group - in ext2fs_inode_alloc_stats2() [all …]
|
D | blknum.c | 19 dgrp_t ext2fs_group_of_blk2(ext2_filsys fs, blk64_t blk) in ext2fs_group_of_blk2() argument 21 return (blk - fs->super->s_first_data_block) / in ext2fs_group_of_blk2() 22 fs->super->s_blocks_per_group; in ext2fs_group_of_blk2() 28 blk64_t ext2fs_group_first_block2(ext2_filsys fs, dgrp_t group) in ext2fs_group_first_block2() argument 30 return fs->super->s_first_data_block + in ext2fs_group_first_block2() 31 ((blk64_t)group * fs->super->s_blocks_per_group); in ext2fs_group_first_block2() 37 blk64_t ext2fs_group_last_block2(ext2_filsys fs, dgrp_t group) in ext2fs_group_last_block2() argument 39 return (group == fs->group_desc_count - 1 ? in ext2fs_group_last_block2() 40 ext2fs_blocks_count(fs->super) - 1 : in ext2fs_group_last_block2() 41 ext2fs_group_first_block2(fs, group) + in ext2fs_group_last_block2() [all …]
|
D | alloc.c | 31 static void check_block_uninit(ext2_filsys fs, ext2fs_block_bitmap map, in check_block_uninit() argument 38 if (!(EXT2_HAS_RO_COMPAT_FEATURE(fs->super, in check_block_uninit() 40 !(ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT))) in check_block_uninit() 43 blk = ext2fs_group_first_block2(fs, group); in check_block_uninit() 45 ext2fs_super_and_bgd_loc2(fs, group, &super_blk, in check_block_uninit() 48 if (fs->super->s_feature_incompat & in check_block_uninit() 50 old_desc_blocks = fs->super->s_first_meta_bg; in check_block_uninit() 52 old_desc_blocks = fs->desc_blocks + fs->super->s_reserved_gdt_blocks; in check_block_uninit() 54 for (i=0; i < fs->super->s_blocks_per_group; i++, blk++) in check_block_uninit() 57 blk = ext2fs_group_first_block2(fs, group); in check_block_uninit() [all …]
|
D | inode.c | 34 ext2_filsys fs; member 47 errcode_t (*done_group)(ext2_filsys fs, 60 errcode_t ext2fs_flush_icache(ext2_filsys fs) in ext2fs_flush_icache() argument 64 if (!fs->icache) in ext2fs_flush_icache() 67 for (i=0; i < fs->icache->cache_size; i++) in ext2fs_flush_icache() 68 fs->icache->cache[i].ino = 0; in ext2fs_flush_icache() 70 fs->icache->buffer_blk = 0; in ext2fs_flush_icache() 74 static errcode_t create_icache(ext2_filsys fs) in create_icache() argument 78 if (fs->icache) in create_icache() 80 retval = ext2fs_get_mem(sizeof(struct ext2_inode_cache), &fs->icache); in create_icache() [all …]
|
D | freefs.c | 22 void ext2fs_free(ext2_filsys fs) in ext2fs_free() argument 24 if (!fs || (fs->magic != EXT2_ET_MAGIC_EXT2FS_FILSYS)) in ext2fs_free() 26 if (fs->image_io != fs->io) { in ext2fs_free() 27 if (fs->image_io) in ext2fs_free() 28 io_channel_close(fs->image_io); in ext2fs_free() 30 if (fs->io) { in ext2fs_free() 31 io_channel_close(fs->io); in ext2fs_free() 33 if (fs->device_name) in ext2fs_free() 34 ext2fs_free_mem(&fs->device_name); in ext2fs_free() 35 if (fs->super) in ext2fs_free() [all …]
|
D | csum.c | 32 __u16 ext2fs_group_desc_csum(ext2_filsys fs, dgrp_t group) in ext2fs_group_desc_csum() argument 34 struct ext2_group_desc *desc = ext2fs_group_desc(fs, fs->group_desc, in ext2fs_group_desc_csum() 36 size_t size = EXT2_DESC_SIZE(fs->super); in ext2fs_group_desc_csum() 40 if (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM) { in ext2fs_group_desc_csum() 53 ext2fs_swap_group_desc2(fs, in ext2fs_group_desc_csum() 59 crc = ext2fs_crc16(~0, fs->super->s_uuid, in ext2fs_group_desc_csum() 60 sizeof(fs->super->s_uuid)); in ext2fs_group_desc_csum() 85 int ext2fs_group_desc_csum_verify(ext2_filsys fs, dgrp_t group) in ext2fs_group_desc_csum_verify() argument 87 if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super, in ext2fs_group_desc_csum_verify() 89 (ext2fs_bg_checksum(fs, group) != in ext2fs_group_desc_csum_verify() [all …]
|
D | dupfs.c | 24 ext2_filsys fs; in ext2fs_dup_handle() local 29 retval = ext2fs_get_mem(sizeof(struct struct_ext2_filsys), &fs); in ext2fs_dup_handle() 33 *fs = *src; in ext2fs_dup_handle() 34 fs->device_name = 0; in ext2fs_dup_handle() 35 fs->super = 0; in ext2fs_dup_handle() 36 fs->orig_super = 0; in ext2fs_dup_handle() 37 fs->group_desc = 0; in ext2fs_dup_handle() 38 fs->inode_map = 0; in ext2fs_dup_handle() 39 fs->block_map = 0; in ext2fs_dup_handle() 40 fs->badblocks = 0; in ext2fs_dup_handle() [all …]
|
D | imager.c | 61 errcode_t ext2fs_image_inode_write(ext2_filsys fs, int fd, int flags) in ext2fs_image_inode_write() argument 70 buf = malloc(fs->blocksize * BUF_BLOCKS); in ext2fs_image_inode_write() 74 for (group = 0; group < fs->group_desc_count; group++) { in ext2fs_image_inode_write() 75 blk = ext2fs_inode_table_loc(fs, (unsigned)group); in ext2fs_image_inode_write() 80 left = fs->inode_blocks_per_group; in ext2fs_image_inode_write() 85 retval = io_channel_read_blk64(fs->io, blk, c, buf); in ext2fs_image_inode_write() 95 if (check_zero_block(cp, fs->blocksize)) { in ext2fs_image_inode_write() 99 cp += fs->blocksize; in ext2fs_image_inode_write() 100 r = lseek(fd, fs->blocksize, SEEK_CUR); in ext2fs_image_inode_write() 109 if (check_zero_block(cp + d*fs->blocksize, fs->blocksize)) in ext2fs_image_inode_write() [all …]
|
D | initialize.c | 53 static unsigned int calc_reserved_gdt_blocks(ext2_filsys fs) in calc_reserved_gdt_blocks() argument 55 struct ext2_super_block *sb = fs->super; in calc_reserved_gdt_blocks() 72 rsv_gdb = ext2fs_div_ceil(rsv_groups, gdpb) - fs->desc_blocks; in calc_reserved_gdt_blocks() 87 ext2_filsys fs; in ext2fs_initialize() local 108 retval = ext2fs_get_mem(sizeof(struct struct_ext2_filsys), &fs); in ext2fs_initialize() 112 memset(fs, 0, sizeof(struct struct_ext2_filsys)); in ext2fs_initialize() 113 fs->magic = EXT2_ET_MAGIC_EXT2FS_FILSYS; in ext2fs_initialize() 114 fs->flags = flags | EXT2_FLAG_RW; in ext2fs_initialize() 115 fs->umask = 022; in ext2fs_initialize() 116 fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE; in ext2fs_initialize() [all …]
|
/external/e2fsprogs/debugfs/ |
D | filefrag.c | 68 static void print_header(struct filefrag_struct *fs) in print_header() argument 70 if (fs->options & VERBOSE_OPT) { in print_header() 71 fprintf(fs->f, "%4s %*s %*s %*s %*s\n", "ext", in print_header() 72 fs->logical_width, "logical", fs->physical_width, in print_header() 73 "physical", fs->physical_width, "expected", in print_header() 74 fs->logical_width, "length"); in print_header() 78 static void report_filefrag(struct filefrag_struct *fs) in report_filefrag() argument 80 if (fs->num == 0) in report_filefrag() 82 if (fs->options & VERBOSE_OPT) { in report_filefrag() 83 if (fs->expected) in report_filefrag() [all …]
|
/external/chromium_org/third_party/skia/third_party/lua/src/ |
D | lcode.c | 37 void luaK_nil (FuncState *fs, int from, int n) { in luaK_nil() argument 40 if (fs->pc > fs->lasttarget) { /* no jumps to current position? */ in luaK_nil() 41 previous = &fs->f->code[fs->pc-1]; in luaK_nil() 55 luaK_codeABC(fs, OP_LOADNIL, from, n - 1, 0); /* else no optimization */ in luaK_nil() 59 int luaK_jump (FuncState *fs) { in luaK_jump() argument 60 int jpc = fs->jpc; /* save list of jumps to here */ in luaK_jump() 62 fs->jpc = NO_JUMP; in luaK_jump() 63 j = luaK_codeAsBx(fs, OP_JMP, 0, NO_JUMP); in luaK_jump() 64 luaK_concat(fs, &j, jpc); /* keep them on hold */ in luaK_jump() 69 void luaK_ret (FuncState *fs, int first, int nret) { in luaK_ret() argument [all …]
|
D | lparser.c | 62 lua_assert(ls->fs != NULL || ls->t.token == TK_EOS); in anchor_token() 83 static l_noret errorlimit (FuncState *fs, int limit, const char *what) { in errorlimit() argument 84 lua_State *L = fs->ls->L; in errorlimit() 86 int line = fs->f->linedefined; in errorlimit() 92 luaX_syntaxerror(fs->ls, msg); in errorlimit() 96 static void checklimit (FuncState *fs, int v, int l, const char *what) { in checklimit() argument 97 if (v > l) errorlimit(fs, l, what); in checklimit() 156 init_exp(e, VK, luaK_stringK(ls->fs, s)); in codestring() 166 FuncState *fs = ls->fs; in registerlocalvar() local 167 Proto *f = fs->f; in registerlocalvar() [all …]
|
/external/chromium_org/third_party/WebKit/Tools/Scripts/webkitpy/common/system/ |
D | filesystem_unittest.py | 47 fs = self.fs 48 self.generic_test_dir = str(self.fs.mkdtemp()) 49 self.orig_cwd = fs.getcwd() 50 fs.chdir(self.generic_test_dir) 51 fs.write_text_file('foo.txt', 'foo') 52 fs.write_text_file('foobar', 'foobar') 53 fs.maybe_make_directory('foodir') 54 fs.write_text_file(fs.join('foodir', 'baz'), 'baz') 55 fs.chdir(self.orig_cwd) 58 self.fs.rmtree(self.generic_test_dir) [all …]
|
/external/e2fsprogs/resize/ |
D | resize2fs.c | 43 static void fix_uninit_block_bitmaps(ext2_filsys fs); 50 static errcode_t fix_resize_inode(ext2_filsys fs); 51 static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs); 52 static errcode_t fix_sb_journal_backup(ext2_filsys fs); 53 static errcode_t mark_table_blocks(ext2_filsys fs, 59 #define IS_BLOCK_BM(fs, i, blk) ((blk) == ext2fs_block_bitmap_loc((fs),(i))) argument 60 #define IS_INODE_BM(fs, i, blk) ((blk) == ext2fs_inode_bitmap_loc((fs),(i))) argument 62 #define IS_INODE_TB(fs, i, blk) (((blk) >= ext2fs_inode_table_loc((fs), (i))) && \ argument 63 ((blk) < (ext2fs_inode_table_loc((fs), (i)) + \ 64 (fs)->inode_blocks_per_group))) [all …]
|
/external/chromium_org/chrome/common/extensions/docs/server2/ |
D | mock_file_system_test.py | 34 fs = MockFileSystem(TestFileSystem(deepcopy(_TEST_DATA))) 36 self.assertTrue(*fs.CheckAndReset()) 37 self.assertFalse(*fs.CheckAndReset(read_count=1)) 38 self.assertFalse(*fs.CheckAndReset(stat_count=1)) 40 future = fs.ReadSingle('apps/') 41 self.assertTrue(*fs.CheckAndReset(read_count=1)) 43 self.assertTrue(*fs.CheckAndReset(read_resolve_count=1)) 44 self.assertFalse(*fs.CheckAndReset(read_count=1)) 45 self.assertTrue(*fs.CheckAndReset()) 47 future = fs.ReadSingle('apps/') [all …]
|
D | test_file_system_test.py | 39 fs = TestFileSystem(deepcopy(_TEST_DATA)) 40 self._TestMetasyntacticPaths(fs) 41 self.assertRaises(FileNotFoundError, _Get(fs.Read), ['404.html/']) 42 self.assertRaises(FileNotFoundError, _Get(fs.Read), ['apps/foo/']) 43 self.assertRaises(FileNotFoundError, _Get(fs.Read), ['apps/foo.html']) 44 self.assertRaises(FileNotFoundError, _Get(fs.Read), ['apps/foo.html']) 45 self.assertRaises(FileNotFoundError, _Get(fs.Read), ['apps/foo/', 47 self.assertRaises(FileNotFoundError, _Get(fs.Read), ['apps/foo/', 50 def _TestMetasyntacticPaths(self, fs): argument 51 self.assertRaises(FileNotFoundError, _Get(fs.Read), ['foo']) [all …]
|
/external/e2fsprogs/e2fsck/ |
D | super.c | 58 static int release_inode_block(ext2_filsys fs, in release_inode_block() argument 81 if ((blk < fs->super->s_first_data_block) || in release_inode_block() 82 (blk >= ext2fs_blocks_count(fs->super))) { in release_inode_block() 89 if (!ext2fs_test_block_bitmap2(fs->block_map, blk)) { in release_inode_block() 108 pb->errcode = io_channel_read_blk64(fs->io, blk, 1, in release_inode_block() 113 limit = fs->blocksize >> 2; in release_inode_block() 130 pb->errcode = io_channel_read_blk64(fs->io, blk, 1, in release_inode_block() 135 fs->blocksize - pb->truncate_offset); in release_inode_block() 136 pb->errcode = io_channel_write_blk64(fs->io, blk, 1, in release_inode_block() 146 ext2fs_block_alloc_stats2(fs, blk, -1); in release_inode_block() [all …]
|
D | pass5.c | 41 init_resource_track(&rtrack, ctx->fs->io); in e2fsck_pass5() 48 if ((ctx->progress)(ctx, 5, 0, ctx->fs->group_desc_count*2)) in e2fsck_pass5() 73 print_resource_track(ctx, _("Pass 5"), &rtrack, ctx->fs->io); in e2fsck_pass5() 79 ext2_filsys fs = ctx->fs; in e2fsck_discard_blocks() local 87 if (ext2fs_test_changed(fs)) in e2fsck_discard_blocks() 91 (io_channel_discard(fs->io, start, count))) in e2fsck_discard_blocks() 104 ext2_filsys fs = ctx->fs; in e2fsck_discard_inodes() local 110 if ((start < 1) || (start > EXT2_INODES_PER_GROUP(fs->super))) { in e2fsck_discard_inodes() 128 !io_channel_discard_zeroes_data(fs->io)) in e2fsck_discard_inodes() 142 EXT2_INODES_PER_BLOCK(fs->super)); in e2fsck_discard_inodes() [all …]
|
/external/chromium_org/native_client_sdk/src/tests/nacl_io_test/ |
D | filesystem_test.cc | 37 MemFsForTesting fs; in TEST() local 48 EXPECT_EQ(1, fs.num_nodes()); in TEST() 51 EXPECT_EQ(ENOENT, fs.Access(Path("/foo"), R_OK | W_OK)); in TEST() 52 EXPECT_EQ(ENOENT, fs.Open(Path("/foo"), O_RDWR, &result_node)); in TEST() 54 EXPECT_EQ(1, fs.num_nodes()); in TEST() 57 EXPECT_EQ(0, fs.Open(Path("/foo"), O_RDWR | O_CREAT, &file)); in TEST() 62 EXPECT_EQ(2, fs.num_nodes()); in TEST() 64 EXPECT_EQ(0, fs.Access(Path("/foo"), R_OK | W_OK)); in TEST() 65 EXPECT_EQ(EACCES, fs.Access(Path("/foo"), X_OK)); in TEST() 68 EXPECT_EQ(0, fs.Access(Path("/"), R_OK | W_OK | X_OK)); in TEST() [all …]
|
/external/libopus/celt/ |
D | laplace.c | 51 void ec_laplace_encode(ec_enc *enc, int *value, unsigned fs, int decay) in ec_laplace_encode() argument 62 fl = fs; in ec_laplace_encode() 63 fs = ec_laplace_get_freq1(fs, decay); in ec_laplace_encode() 65 for (i=1; fs > 0 && i < val; i++) in ec_laplace_encode() 67 fs *= 2; in ec_laplace_encode() 68 fl += fs+2*LAPLACE_MINP; in ec_laplace_encode() 69 fs = (fs*(opus_int32)decay)>>15; in ec_laplace_encode() 72 if (!fs) in ec_laplace_encode() 80 fs = IMIN(LAPLACE_MINP, 32768-fl); in ec_laplace_encode() 85 fs += LAPLACE_MINP; in ec_laplace_encode() [all …]
|