Lines Matching refs:line
46 char *line = NULL; in get_num_cpus() local
59 if ((read = getline(&line, &len, file)) != -1) { in get_num_cpus()
60 if (strnlen(line, read) < 3 || strncmp(line, "0-", 2) != 0 || !isdigit(line[2])) in get_num_cpus()
63 cpus = atoi(&line[2]) + 1; in get_num_cpus()
65 free(line); in get_num_cpus()
84 char *line = NULL; in get_cpu_usages() local
105 while ((read = getline(&line, &len, file)) != -1) { in get_cpu_usages()
106 if (strnlen(line, read) < 4 || strncmp(line, "cpu", 3) != 0 || !isdigit(line[3])) { in get_cpu_usages()
107 free(line); in get_cpu_usages()
108 line = NULL; in get_cpu_usages()
113 vals = sscanf(line, "cpu%d %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64, &cpu_num, &user, in get_cpu_usages()
116 free(line); in get_cpu_usages()
117 line = NULL; in get_cpu_usages()