len = strlen(key);
while (*str) {
if (startswith(str, key)) {
- sscanf(str + len, "%lu", v);
+ sscanf(str + len, "%" PRIu64, v);
return;
}
eol = strchr(str, '\n');
if (!eol)
return;
- str = eol+1;
+ str = eol + 1;
}
}
stats.read_sectors || stats.write_sectors || stats.read_ticks ||
stats.write_ticks || stats.ios_pgr || stats.total_ticks || stats.rq_ticks ||
stats.discard_merged || stats.discard_sectors || stats.discard_ticks)
- snprintf(lbuf, 256, "%u %u %s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n",
+ snprintf(lbuf, 256, "%u %u %s %" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "\n",
stats.major,
stats.minor,
stats.dev_name,
curcpu++;
- ret = sscanf(line, "%*s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu",
+ ret = sscanf(line, "%*s %" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64,
&user,
&nice,
&system,
cache = d->buf;
- int cpuall_len = snprintf(cpuall, CPUALL_MAX_SIZE, "cpu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n",
+ int cpuall_len = snprintf(cpuall, CPUALL_MAX_SIZE, "cpu %" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "%" PRIu64 "\n",
user_sum,
nice_sum,
system_sum,