/system/extras/cpustats/ |
H A D | cpustats.c | 56 static int get_cpu_count_from_file(char *filename); 184 * Get the number of CPUs from a given filename. 186 static int get_cpu_count_from_file(char *filename) { argument 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); 204 die("Unexpected input in file %s (%s).\n", filename, line); 213 char filename[MAX_BUF_SIZE]; local 217 sprintf(filename, "/sys/devices/system/cpu/cpu%d/cpufreq/stats/time_in_state", cpu); 218 file = fopen(filename, " 264 char filename[MAX_BUF_SIZE]; local [all...] |
/system/extras/latencytop/ |
H A D | latencytop.c | 232 char filename[MAX_FILENAME]; local 236 sprintf(filename, THREAD_STATS_FILE_FORMAT, pid, tid); 239 f = fopen(filename, "w"); 242 fprintf(stderr, "Could not open %s: %s\n", filename, strerror(errno)); 256 fprintf(stderr, "Could not open %s: %s\n", filename, strerror(errno));
|
/system/extras/libpagemap/ |
H A D | pm_process.c | 34 char filename[MAX_FILENAME]; local 47 error = snprintf(filename, MAX_FILENAME, "/proc/%d/pagemap", pid); 54 proc->pagemap_fd = open(filename, O_RDONLY); 170 char filename[MAX_FILENAME]; local 191 error = snprintf(filename, MAX_FILENAME, "/proc/%d/clear_refs", 197 fd = open(filename, O_WRONLY); 232 char filename[MAX_FILENAME]; local 247 error = snprintf(filename, MAX_FILENAME, "/proc/%d/maps", proc->pid); 251 maps_f = fopen(filename, "r");
|
/system/extras/memtrack/ |
H A D | memtrack.cpp | 40 FileData::FileData(char *filename, char *buffer, size_t buffer_len) argument 43 fd_ = open(filename, O_RDONLY);
|
/system/extras/procrank/ |
H A D | procrank.c | 369 char *filename; local 378 if (asprintf(&filename, "/proc/%zd/cmdline", pid) < 0) { 383 f = fopen(filename, "r"); 397 free(filename);
|
/system/extras/tests/sdcard/ |
H A D | sdcard_perf_test.cpp | 292 char filename[80] = {'\0',}; local 294 sprintf(filename, "%s/file-%d-%d", kTestDir, idx, getpid()); 297 int fd = open(filename, O_RDONLY); 373 char filename[80] = {'\0',}; local 375 sprintf(filename, "%s/file-%d-%d", kTestDir, i, testCase->pid()); 376 int fd = open(filename, O_RDWR | O_CREAT, S_IRWXU); 419 char filename[80] = {'\0',}; local 421 sprintf(filename, "%s/file-%d-%d", kTestDir, idx, getpid()); 423 int fd = open(filename, O_RDWR | O_CREAT, S_IRWXU); // no O_TRUNC, see header comment 533 char filename[8 local 559 writeTestFile(TestCase *testCase, const char* filename) argument [all...] |
H A D | sysutil.cpp | 65 void printErrno(const char *msg, const char *filename) argument 67 fprintf(stderr, "# %s %s %d %s\n", msg, filename, errno, strerror(errno)); 72 // @param filename Of the file to read. 77 int readStringFromFile(const char *filename, char *const start, size_t size, bool must_exist=true) argument 84 int fd = open(filename, O_RDONLY); 90 printErrno("Failed to open", filename); 112 printErrno("Failed to read", filename); 138 fprintf(stderr, "Buffer too small for %s\n", filename); 146 int writeStringToFile(const char *filename, const char *start, bool must_exist=true) argument 148 int fd = open(filename, O_WRONL 201 writeIntToFile(const char *filename, long value) argument 242 char filename[FILENAME_MAX]; local 259 char filename[FILENAME_MAX]; local [all...] |
/system/core/init/ |
H A D | bootchart.c | 66 proc_read(const char* filename, char* buff, size_t buffsize) argument 69 int fd = open(filename, O_RDONLY); 254 char filename[32]; local 261 snprintf(filename,sizeof(filename),"/proc/%d/cmdline",pid); 262 proc_read(filename, cmdline, sizeof(cmdline)); 265 snprintf(filename,sizeof(filename),"/proc/%d/stat",pid); 266 fd = open(filename,O_RDONLY);
|
H A D | util.c | 366 int wait_for_file(const char *filename, int timeout) argument 372 while (gettime() < timeout_time && ((ret = stat(filename, &info)) < 0)) 517 static int nftw_restorecon(const char* filename, const struct stat* statptr, argument 520 restorecon(filename);
|
H A D | builtins.c | 136 static int insmod(const char *filename, char *options) argument 142 module = read_file(filename, &size);
|
H A D | init_parser.c | 45 const char *filename; member in struct:import 310 state->line, state->filename); 315 import->filename = strdup(conf_file); 317 INFO("found import '%s', adding to import list", import->filename); 356 state.filename = fn; 396 INFO("importing '%s'", import->filename); 397 ret = init_parse_config_file(import->filename); 400 import->filename, fn);
|
/system/extras/ext4_utils/ |
H A D | contents.c | 50 dentry_len = 8 + ALIGN(strlen(dentries[i].filename), 4); 156 dentries[i].filename, dentries[i].file_type); 159 dentries[i].filename, offset, len); 174 u32 make_file(const char *filename, u64 len) argument 192 inode_allocate_file_extents(inode, len, filename);
|
H A D | make_ext4fs.c | 86 .filename = "lost+found", 147 dentries[i].filename = strdup(namelist[i]->d_name); 148 if (dentries[i].filename == NULL) 226 dentries[0].filename = strdup("lost+found"); 293 free((void *)dentries[i].filename); 380 int make_ext4fs(const char *filename, long long len, argument 389 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
|
/system/extras/ksmutils/ |
H A D | ksminfo.c | 200 char filename[MAX_FILENAME]; local 212 error = snprintf(filename, MAX_FILENAME, "/proc/%d/mem", pid); 223 fd = open(filename, O_RDONLY); 225 fprintf(stderr, "warning: could not open %s\n", filename); 442 char *filename; local 451 if (asprintf(&filename, "/proc/%zd/cmdline", pid) < 0) { 456 f = fopen(filename, "r"); 470 free(filename);
|
/system/extras/librank/ |
H A D | librank.c | 445 char filename[20]; local 448 sprintf(filename, "/proc/%d/cmdline", pid); 449 f = fopen(filename, "r");
|
/system/core/toolbox/ |
H A D | getevent.c | 266 char filename[PATH_MAX]; local 277 snprintf(filename, sizeof(filename), "%s/%s/rdesc", dirname, de->d_name); 279 file = fopen(filename, "r"); 411 char *filename; local 427 filename = devname + strlen(devname); 428 *filename++ = '/'; 434 strcpy(filename, event->name); 452 char *filename; local 459 filename [all...] |
H A D | top.c | 95 static int read_stat(char *filename, struct proc_info *proc); 98 static int read_cmdline(char *filename, struct proc_info *proc); 99 static int read_status(char *filename, struct proc_info *proc); 226 char filename[64]; local 260 sprintf(filename, "/proc/%d/stat", pid); 261 read_stat(filename, proc); 263 sprintf(filename, "/proc/%d/cmdline", pid); 264 read_cmdline(filename, proc); 266 sprintf(filename, "/proc/%d/status", pid); 267 read_status(filename, pro 324 read_stat(char *filename, struct proc_info *proc) argument 365 read_cmdline(char *filename, struct proc_info *proc) argument 392 read_status(char *filename, struct proc_info *proc) argument [all...] |
/system/core/adb/ |
H A D | commandline.c | 702 const char* filename = strcpy(default_name, "./backup.ab"); local 710 fprintf(stderr, "adb: -f passed with no filename\n"); 713 filename = argv[i+1]; 722 /* bare "adb backup" or "adb backup -f filename" are not valid invocations */ 725 adb_unlink(filename); 726 mkdirs((char *)filename); 727 outFd = adb_creat(filename, 0640); 729 fprintf(stderr, "adb: unable to open file %s\n", filename); 739 D("backup. filename=%s buf=%s\n", filename, bu 756 const char* filename; local 1611 delete_file(transport_type transport, char* serial, char* filename) argument 1625 get_basename(const char* filename) argument 1636 check_file(const char* filename) argument [all...] |
/system/core/debuggerd/ |
H A D | tombstone.c | 489 static void dump_log_file(log_t* log, pid_t pid, const char* filename, argument 501 int logfd = open(filename, O_RDONLY | O_NONBLOCK); 503 XLOG("Unable to open %s: %s\n", filename, strerror(errno)); 548 tailOnly ? "tail end of " : "", filename);
|
/system/core/fs_mgr/ |
H A D | fs_mgr.c | 129 static int wait_for_file(const char *filename, int timeout) argument 135 while (gettime() < timeout_time && ((ret = stat(filename, &info)) < 0)) 451 /* Free the fstab filename */
|
/system/vold/ |
H A D | VolumeManager.cpp | 531 int VolumeManager::fixupAsecPermissions(const char *id, gid_t gid, const char* filename) { argument 600 const bool privateFile = !strcmp(ftsent->fts_name, filename);
|
/system/security/keystore/ |
H A D | keystore.cpp | 497 ResponseCode writeBlob(const char* filename, AES_KEY *aes_key, State state, Entropy* entropy) { argument 498 ALOGV("writing blob %s", filename); 506 ALOGW("Could not read random data for: %s", filename); 553 if (rename(tmpFileName, filename) == -1) { 554 ALOGW("could not rename blob to %s: %s", filename, strerror(errno)); 560 ResponseCode readBlob(const char* filename, AES_KEY *aes_key, State state) { argument 561 ALOGV("reading blob %s", filename); 562 int in = TEMP_FAILURE_RETRY(open(filename, O_RDONLY)); 867 const uint8_t* filename; member in struct:__anon327 966 char filename[NAME_MA local 995 get(const char* filename, Blob* keyBlob, const BlobType type, uid_t uid) argument 1043 put(const char* filename, Blob* keyBlob, uid_t uid) argument 1049 addGrant(const char* filename, uid_t granteeUid) argument 1059 removeGrant(const char* filename, uid_t granteeUid) argument 1072 hasGrant(const char* filename, const uid_t uid) const argument 1076 importKey(const uint8_t* key, size_t keyLen, const char* filename, uid_t uid, int32_t flags) argument 1223 getGrant(const char* filename, uid_t uid) const argument 1239 upgradeBlob(const char* filename, Blob* blob, const uint8_t oldVersion, const BlobType type, uid_t uid) argument 1283 importBlobAsKey(Blob* blob, const char* filename, uid_t uid) argument [all...] |