/system/core/libcutils/ |
D | dir_hash.c | 70 FILE *f = fopen(path, "rb"); in get_file_hash() local 73 if (f == NULL) { in get_file_hash() 79 while ((len = fread(buf, 1, sizeof(buf), f)) > 0) { in get_file_hash() 83 if (ferror(f)) { in get_file_hash() 84 fclose(f); in get_file_hash() 88 fclose(f); in get_file_hash() 132 struct list *f; in recurse() local 154 for (f = list; f != NULL; f = next) { in recurse() 155 next = f->next; in recurse() 156 free(f->name); in recurse() [all …]
|
D | android_reboot.c | 33 FILE *f; in remount_ro_done() local 43 f = fopen("/proc/mounts", "r"); in remount_ro_done() 44 if (! f) { in remount_ro_done() 50 match = fscanf(f, "%255s %255s %255s %255s %d %d\n", in remount_ro_done() 63 fclose(f); in remount_ro_done()
|
/system/core/toolbox/grep/ |
D | file.c | 78 grep_refill(struct file *f) in grep_refill() argument 107 if (lseek(f->fd, 0, SEEK_SET) == -1) in grep_refill() 109 nr = read(f->fd, buffer, MAXBUFSIZ); in grep_refill() 117 nr = read(f->fd, buffer, MAXBUFSIZ); in grep_refill() 139 grep_fgetln(struct file *f, size_t *lenp) in grep_fgetln() argument 148 if (bufrem == 0 && grep_refill(f) != 0) in grep_fgetln() 175 if (grep_refill(f) != 0) in grep_fgetln() 202 grep_file_init(struct file *f) in grep_file_init() argument 207 (gzbufdesc = gzdopen(f->fd, "r")) == NULL) in grep_file_init() 211 (bzbufdesc = BZ2_bzdopen(f->fd, "r")) == NULL) in grep_file_init() [all …]
|
D | util.c | 189 struct file *f; in procfile() local 200 f = grep_open(NULL); in procfile() 211 f = grep_open(fn); in procfile() 213 if (f == NULL) { in procfile() 230 if ((ln.dat = grep_fgetln(f, &ln.len)) == NULL || ln.len == 0) in procfile() 237 if (f->binary && binbehave == BINFILE_SKIP) { in procfile() 238 grep_close(f); in procfile() 240 free(f); in procfile() 244 t = procline(&ln, f->binary); in procfile() 256 grep_close(f); in procfile() [all …]
|
/system/core/adb/ |
D | sysdeps_win32.c | 81 void (*_fh_init) ( FH f ); 82 int (*_fh_close)( FH f ); 83 int (*_fh_lseek)( FH f, int pos, int origin ); 84 int (*_fh_read) ( FH f, void* buf, int len ); 85 int (*_fh_write)( FH f, const void* buf, int len ); 86 void (*_fh_hook) ( FH f, int events, EventHook hook ); 126 FH f; in _fh_from_int() local 136 f = &_win32_fhs[fd]; in _fh_from_int() 138 if (f->used == 0) { in _fh_from_int() 144 return f; in _fh_from_int() [all …]
|
D | adb_auth_client.c | 52 FILE *f; in read_keys() local 57 f = fopen(file, "r"); in read_keys() 58 if (!f) { in read_keys() 63 while (fgets(buf, sizeof(buf), f)) { in read_keys() 91 fclose(f); in read_keys() 123 FILE *f; in adb_auth_generate_token() local 126 f = fopen("/dev/urandom", "r"); in adb_auth_generate_token() 127 if (!f) in adb_auth_generate_token() 130 ret = fread(token, token_size, 1, f); in adb_auth_generate_token() 132 fclose(f); in adb_auth_generate_token()
|
D | adb_auth_host.c | 180 FILE *f = NULL; in generate_key() local 196 f = fopen(file, "w"); in generate_key() 197 if (!f) { in generate_key() 205 if (!PEM_write_PrivateKey(f, pkey, NULL, NULL, 0, NULL, NULL)) { in generate_key() 218 if (f) in generate_key() 219 fclose(f); in generate_key() 229 FILE *f; in read_key() local 233 f = fopen(file, "r"); in read_key() 234 if (!f) { in read_key() 242 fclose(f); in read_key() [all …]
|
/system/core/libzipfile/ |
D | test_zipfile.c | 11 FILE* f; in main() local 34 f = fopen(argv[1], "r"); in main() 35 if (f == NULL) { in main() 40 fseek(f, 0, SEEK_END); in main() 41 size = ftell(f); in main() 42 rewind(f); in main() 45 fread(buf, 1, size, f); in main() 53 fclose(f); in main() 70 f = fopen(argv[4], "w"); in main() 71 if (f == NULL) { in main() [all …]
|
/system/extras/fatblock/ |
D | read.c | 52 static int file_check_metadata(struct file *f) in file_check_metadata() argument 57 assert(f); in file_check_metadata() 59 ret = stat(f->path, &st); in file_check_metadata() 62 f->path, strerror(errno)); in file_check_metadata() 66 if (f->mtime != st.st_mtime) in file_check_metadata() 72 static int file_read(struct file *f, char *buf, offset_t off, offset_t len) in file_read() argument 78 assert(f); in file_read() 84 f->path, off, len); in file_read() 91 f->path, off, len); in file_read() 95 if (file_check_metadata(f)) { in file_read() [all …]
|
D | import.c | 98 struct file *f = NULL; in import_file() local 108 f = malloc(sizeof(struct file)); in import_file() 109 if (!f) { in import_file() 124 f->path = path_copy; in import_file() 125 f->size = st.st_size; in import_file() 126 f->dev = st.st_dev; in import_file() 127 f->ino = st.st_ino; in import_file() 128 f->mtime = st.st_mtime; in import_file() 129 fdpool_init(&f->pfd); in import_file() 131 ret = fs_alloc_extent(fs, &f->extent, in import_file() [all …]
|
/system/extras/latencytop/ |
D | latencytop.c | 51 static struct latency_entry *read_latency_file(FILE *f, struct latency_entry *list); 52 static void erase_latency_file(FILE *f); 175 FILE *f; in read_global_stats() local 179 f = fopen(GLOBAL_STATS_FILE, "w"); in read_global_stats() 180 if (!f) { in read_global_stats() 184 fprintf(f, "erase\n"); in read_global_stats() 185 fclose(f); in read_global_stats() 188 f = fopen(GLOBAL_STATS_FILE, "r"); in read_global_stats() 189 if (!f) { in read_global_stats() 194 e = read_latency_file(f, list); in read_global_stats() [all …]
|
/system/core/sh/ |
D | output.c | 280 doformat(struct output *dest, const char *f, va_list ap) in doformat() argument 285 vasprintf(&s, f, ap); in doformat() 312 while ((c = *f++) != '\0') { in doformat() 324 if (*f == '-') in doformat() 326 else if (*f == '#') in doformat() 330 f++; in doformat() 332 if (*f == '*') { in doformat() 334 f++; in doformat() 336 while (is_digit(*f)) { in doformat() 337 width = 10 * width + digit_val(*f++); in doformat() [all …]
|
D | redir.c | 179 int f; in openredirect() local 196 if ((f = open(fname, O_RDONLY|eflags)) < 0) in openredirect() 199 (void)fcntl(f, F_SETFL, fcntl(f, F_GETFL, 0) & ~eflags); in openredirect() 203 if ((f = open(fname, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0) in openredirect() 212 if ((f = open(fname, oflags, 0666)) < 0) in openredirect() 217 if ((f = open(fname, O_WRONLY|O_CREAT|O_APPEND, 0666)) < 0) in openredirect() 232 f = openhere(redir); in openredirect() 238 if (f != fd) { in openredirect() 239 copyfd(f, fd); in openredirect() 240 close(f); in openredirect()
|
/system/core/toolbox/ |
D | vmstat.c | 160 FILE *f; in read_meminfo() local 162 f = fopen("/proc/meminfo", "r"); in read_meminfo() 163 if (!f) return errno; in read_meminfo() 165 while (fgets(line, MAX_LINE, f)) { in read_meminfo() 172 fclose(f); in read_meminfo() 178 FILE *f; in read_stat() local 180 f = fopen("/proc/stat", "r"); in read_stat() 181 if (!f) return errno; in read_stat() 183 while (fgets(line, MAX_LINE, f)) { in read_stat() 195 fclose(f); in read_stat() [all …]
|
D | umount.c | 30 FILE* f; in is_loop_mount() local 38 f = fopen("/proc/mounts", "r"); in is_loop_mount() 39 if (!f) { in is_loop_mount() 45 count = fscanf(f, "%255s %255s %255s\n", device, mount_path, rest); in is_loop_mount() 55 fclose(f); in is_loop_mount()
|
D | mount.c | 217 FILE* f; in print_mounts() local 221 f = fopen("/proc/mounts", "r"); in print_mounts() 222 if (!f) { in print_mounts() 228 length = fread(buffer, 1, 100, f); in print_mounts() 233 fclose(f); in print_mounts() 239 FILE *f; in get_mounts_dev_dir() local 248 f = fopen("/proc/mounts", "r"); in get_mounts_dev_dir() 249 if (!f) { in get_mounts_dev_dir() 255 match = fscanf(f, "%255s %255s %255s %255s %d %d\n", in get_mounts_dev_dir() 267 fclose(f); in get_mounts_dev_dir() [all …]
|
D | df.c | 47 FILE *f = fopen("/proc/mounts", "r"); in df_main() local 49 while (fgets(s, 2000, f)) { in df_main() 69 fclose(f); in df_main()
|
/system/extras/tests/bionic/libc/other/ |
D | test_zlib.c | 177 FILE* f; in main() local 220 FILE* f = fopen(argv[1], "rb"); in main() local 225 if (f == NULL) { in main() 231 fseek( f, 0, SEEK_END ); in main() 232 fsize = ftell(f); in main() 233 fseek( f, 0, SEEK_SET ); in main() 238 fclose(f); in main() 244 ret = def( f, out, compression_level ); in main() 250 fclose(f); in main() 253 f = fopen( tempfile, "rb" ); in main() [all …]
|
D | test_jpeg.c | 241 FILE* f; in main() local 311 FILE* f = fopen( argv[1], "rb" ); in main() local 314 if (f == NULL) { in main() 319 fseek( f, 0, SEEK_END ); in main() 320 fsize = ftell(f); in main() 321 fseek( f, 0, SEEK_SET ); in main() 329 fseek( f, 0, SEEK_SET ); in main() 330 decompress(f, dct_method, disable_rgb); in main() 332 fclose( f ); in main() 339 fclose(f); in main() [all …]
|
/system/core/libpixelflinger/ |
D | buffer.cpp | 116 const GGLFormat* f = &(c->formats[s->format]); in read_pixel() local 118 uint8_t* const data = s->data + index * f->size; in read_pixel() 120 switch (f->size) { in read_pixel() 127 pixel->s[i] = f->c[i].h - f->c[i].l; in read_pixel() 129 pixel->c[i] = extract(v, f->c[i].h, f->c[i].l, f->size*8); in read_pixel() 173 const GGLFormat* f = &(c->formats[s->format]); in write_pixel() local 175 uint8_t* const data = s->data + index * f->size; in write_pixel() 181 if (f->components>=GGL_LUMINANCE && in write_pixel() 186 const int l = f->c[i].l; in write_pixel() 187 const int h = f->c[i].h; in write_pixel() [all …]
|
/system/core/libpixelflinger/codeflinger/ |
D | GGLAssembler.h | 203 reg_t(int r, int f=0) 204 : reg(r), flags(f) { in reg() 206 void setTo(int r, int f=0) { 207 reg=r; flags=f; 216 integer_t(int r, int sz=32, int f=0) 217 : reg_t(r, f), s(sz) { in reg_t() 219 void setTo(int r, int sz=32, int f=0) { 220 reg_t::setTo(r, f); s=sz; 230 pixel_t(int r, const GGLFormat* fmt, int f=0) 231 : reg_t(r, f), format(*fmt) { in reg_t() [all …]
|
D | blending.cpp | 51 CONTEXT_LOAD(factor.reg, generated_vars.f); in build_fog() 255 integer_t& factor, int f, int component, in build_blend_factor() argument 267 switch(f) { in build_blend_factor() 275 if (!mBlendFactorCached || mBlendFactorCached==f) { in build_blend_factor() 284 mBlendFactorCached = f; in build_blend_factor() 299 mBlendFactorCached = f; in build_blend_factor() 327 switch(f) { in build_blend_factor() 360 switch(f) { in build_blend_factor() 475 const integer_t& f) in mul_factor() argument 478 int fs = f.size(); in mul_factor() [all …]
|
/system/core/init/ |
D | grab-bootchart.sh | 17 for f in $FILES; do 18 adb pull $LOGROOT/$f $TMPDIR/$f 2>&1 > /dev/null
|
/system/extras/tests/bionic/libstdc++/ |
D | test_csetjmp.cpp | 38 #define FAIL_UNLESS(f) if (!android::f()) return kFailed; argument
|
D | test_csignal.cpp | 37 #define FAIL_UNLESS(f) if (!android::f()) return kFailed; argument
|