/system/core/libcutils/ |
H A D | cpu_info.c | 6 ** you may not use this file except in compliance with the License. 31 FILE* file; local 37 file = fopen("proc/cpuinfo", "r"); 38 if (! file) 41 while ((chp = fgets(serial_number, sizeof(serial_number), file)) != NULL) 79 fclose(file);
|
H A D | trace.c | 5 * you may not use this file except in compliance with the License. 101 FILE * file = fopen("/proc/self/cmdline", "r"); local 102 if (file) { 104 if (fgets(cmdline, sizeof(cmdline), file)) { 109 fclose(file); 172 ALOGE("Error opening trace file: %s (%d)", strerror(errno), errno);
|
/system/extras/tests/cpueater/ |
H A D | daemonize.c | 5 * you may not use this file except in compliance with the License. 36 char *file = 0; local 53 file = *argv; 55 file = *++argv; 71 if (file) { 72 if(open(file, O_WRONLY|mode|O_CREAT, 0666) < 0) { 73 perror(file);
|
/system/extras/tests/bionic/libstdc++/ |
H A D | test_cstdio.cpp | 31 #error "Wrong header file included!!" 156 volatile std::FILE file; local
|
/system/core/toolbox/ |
H A D | insmod.c | 20 /* open the file */ 51 void *file; local 62 /* read the file into memory */ 63 file = read_file(argv[1], &size); 64 if (!file) { 85 ret = init_module(file, size, opts); 92 /* free the file buffer */ 93 free(file);
|
H A D | touch.c | 12 fprintf(stderr, "touch: usage: touch [-alm] [-t YYYYMMDD[.hhmmss]] <file>\n"); 46 char *file = 0; local 79 file = argv[i]; 83 if (! file) { 84 fprintf(stderr, "touch: no file specified\n"); 88 if (access(file, F_OK)) 89 if ((fd=creat(file, 0666)) != -1) 106 fprintf(stderr, "file = %s\n", file); 112 return utimensat(AT_FDCWD, file, time [all...] |
H A D | uptime.c | 81 FILE* file = fopen("/proc/uptime", "r"); local 82 if (!file) { 86 if (fscanf(file, "%*f %f", &idle_time) != 1) { 88 fclose(file); 91 fclose(file);
|
H A D | lsof.c | 98 // Prints out all file that have been memory mapped 108 char file[PATH_MAX]; local 117 file) == 4) { 118 // We don't care about non-file maps 124 "???", device, offset, inode, file); 133 // Prints out all open file descriptors
|
/system/extras/fatblock/ |
H A D | fatblock.h | 5 * you may not use this file except in compliance with the License. 43 struct file { struct
|
H A D | fatblock.c | 5 * you may not use this file except in compliance with the License. 83 FILE *file; local 85 sprintf(filename, "/sys/devices/platform/usb_mass_storage/lun%d/file", 87 file = fopen(filename, "w"); 88 if (!file) { 89 WARN("setting USB mass storage file: fopen(%s) failed: %s\n", 96 fprintf(file, "/dev/block/ublock%d", index); 98 fclose(file); 106 FILE *file; local 108 sprintf(filename, "/sys/devices/platform/usb_mass_storage/lun%d/file", [all...] |
/system/vold/ |
H A D | Process.cpp | 5 * you may not use this file except in compliance with the License. 104 // append the file name, after truncating to parent directory 129 FILE *file; local 133 file = fopen(buffer, "r"); 134 if (!file) 137 while (fgets(buffer, sizeof(buffer), file)) { 145 fclose(file); 150 fclose(file); 201 SLOGE("Process %s (%d) has open file %s", name, pid, openfile);
|
H A D | Loop.cpp | 5 * you may not use this file except in compliance with the License. 235 int Loop::createImageFile(const char *file, unsigned int numSectors) { argument 238 if ((fd = creat(file, 0600)) < 0) {
|
/system/core/libctest/ |
H A D | ctest.c | 5 * you may not use this file except in compliance with the License. 131 // TODO: Report file name. 150 void assertTrueWithSource(int value, const char* file, int line, char* message) { argument 154 fprintf(suite->out, "Assertion failed: [%s:%d] %s: %s\n", file, line,
|
/system/core/libzipfile/ |
H A D | centraldir.c | 17 // local file header
34 read_central_dir_values(Zipfile* file, const unsigned char* buf, int len)
argument 37 // looks like ZIP file got truncated
43 file->disknum = read_le_short(&buf[0x04]);
44 file->diskWithCentralDir = read_le_short(&buf[0x06]);
45 file->entryCount = read_le_short(&buf[0x08]);
46 file->totalEntryCount = read_le_short(&buf[0x0a]);
47 file->centralDirSize = read_le_int(&buf[0x0c]);
48 file->centralDirOffest = read_le_int(&buf[0x10]);
49 file 64 read_central_directory_entry(Zipfile* file, Zipentry* entry, const unsigned char** buf, ssize_t* len) argument 181 read_central_dir(Zipfile *file) argument [all...] |
H A D | zipfile.c | 14 Zipfile *file = malloc(sizeof(Zipfile)); local 15 if (file == NULL) return NULL; 16 memset(file, 0, sizeof(Zipfile)); 17 file->buf = data; 18 file->bufsize = size; 20 err = read_central_dir(file); 23 return file; 25 free(file); 32 Zipfile* file = (Zipfile*)f; local 33 Zipentry* entry = file 45 Zipfile* file = (Zipfile*)f; local 132 dump_zipfile(FILE* to, zipfile_t file) argument 148 iterate_zipfile(zipfile_t file, void** cookie) argument [all...] |
/system/core/adb/ |
H A D | adb_auth_client.c | 5 * you may not use this file except in compliance with the License. 52 static void read_keys(const char *file, struct listnode *list) argument 60 f = fopen(file, "r"); 62 D("Can't open '%s'\n", file); 80 D("%s: Invalid base64 data ret=%d\n", file, ret); 86 D("%s: Invalid key len %d\n", file, key->key.len);
|
H A D | adb_auth_host.c | 5 * you may not use this file except in compliance with the License. 174 static int generate_key(const char *file) argument 183 D("generate_key '%s'\n", file); 196 f = fopen(file, "w"); 198 D("Failed to open '%s'\n", file); 210 if (!write_public_keyfile(rsa, file)) { 226 static int read_key(const char *file, struct listnode *list) argument 231 D("read_key '%s'\n", file); 233 f = fopen(file, "r"); 235 D("Failed to open '%s'\n", file); 384 char *file; local [all...] |
/system/core/libnetutils/ |
H A D | dhcpmsg.h | 5 * you may not use this file except in compliance with the License. 55 char file[128]; /* asciiz boot file name */ member in struct:dhcp_msg
|
/system/core/libsparse/ |
H A D | backed_block.c | 5 * you may not use this file except in compliance with the License. 37 } file; member in union:backed_block::__anon224 84 return bb->file.filename; 97 return bb->file.offset; 117 free(bb->file.filename); 224 if (a->file.filename != b->file.filename || 225 a->file.offset + a->len != b->file.offset) { 323 /* Queues a chunk of a file o [all...] |
/system/core/sh/ |
H A D | output.c | 105 * Set up an output file to write to memory rather than a file. 109 open_mem(char *block, int length, struct output *file) argument 111 file->nextc = block; 112 file->nleft = --length; 113 file->fd = BLOCK_OUT; 114 file->flags = 0; 134 outstr(const char *p, struct output *file) argument 137 outc(*p++, file); 138 if (file 211 outfmt(struct output *file, const char *fmt, ...) argument [all...] |
/system/core/toolbox/cp/ |
H A D | utils.c | 69 set_utimes(const char *file, struct stat *fs) argument 79 if (utimes(file, tv)) { 80 warn("utimes: %s", file); 87 if (lutimes(file, tv)) { 88 warn("lutimes: %s", file); 130 * If the file exists and we're interactive, verify with the user. 131 * If the file DNE, set the mode to be the from file, minus setuid 134 * other choice is 666 or'ed with the execute bits on the from file 168 * attempt to remove existing destination file nam [all...] |
/system/core/toolbox/grep/ |
H A D | grep.h | 88 struct file { struct 97 char *file; member in struct:str 158 /* file.c */ 159 void grep_close(struct file *f); 160 struct file *grep_open(const char *path); 161 char *grep_fgetln(struct file *f, size_t *len);
|
/system/extras/cpustats/ |
H A D | cpustats.c | 187 FILE *file; local 191 file = fopen(filename, "r"); 192 if (!file) die("Could not open %s\n", filename); 193 if (!fgets(line, MAX_BUF_SIZE, file)) die("Could not get %s contents\n", filename); 194 fclose(file); 204 die("Unexpected input in file %s (%s).\n", filename, line); 212 FILE *file; local 218 file = fopen(filename, "r"); 219 if (!file) die("Could not open %s\n", filename); 222 fscanf(file, " 234 FILE *file; local 263 FILE *file; local [all...] |
/system/core/debuggerd/ |
H A D | debuggerd.c | 6 ** you may not use this file except in compliance with the License. 60 write_string(const char* file, const char* string) argument 65 fd = open(file, O_RDWR); 288 * currently assume it does.) We write to the file descriptor to 509 " -b dump backtrace to console, otherwise dump full tombstone file\n"
|
/system/media/audio_route/ |
H A D | audio_route.c | 6 * you may not use this file except in compliance with the License. 651 FILE *file; local 679 file = fopen(xml_path, "r"); 681 if (!file) { 702 bytes_read = fread(buf, 1, BUF_SIZE, file); 722 fclose(file); 728 fclose(file);
|