projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fio: Fix (unsigned) integer overflow issues
[fio.git]
/
client.c
diff --git
a/client.c
b/client.c
index 4121ea5f4f17df7a9565570bcbb51816ae0229fb..9a8cf17e0619585d230186555a1d703096553b36 100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-1135,11
+1135,11
@@
static void convert_jobs_eta(struct jobs_eta *je)
je->files_open = le32_to_cpu(je->files_open);
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
je->files_open = le32_to_cpu(je->files_open);
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
- je->m_rate[i] = le
32
_to_cpu(je->m_rate[i]);
- je->t_rate[i] = le
32
_to_cpu(je->t_rate[i]);
+ je->m_rate[i] = le
64
_to_cpu(je->m_rate[i]);
+ je->t_rate[i] = le
64
_to_cpu(je->t_rate[i]);
je->m_iops[i] = le32_to_cpu(je->m_iops[i]);
je->t_iops[i] = le32_to_cpu(je->t_iops[i]);
je->m_iops[i] = le32_to_cpu(je->m_iops[i]);
je->t_iops[i] = le32_to_cpu(je->t_iops[i]);
- je->rate[i] = le
32
_to_cpu(je->rate[i]);
+ je->rate[i] = le
64
_to_cpu(je->rate[i]);
je->iops[i] = le32_to_cpu(je->iops[i]);
}
je->iops[i] = le32_to_cpu(je->iops[i]);
}
@@
-1304,8
+1304,7
@@
static int fio_client_handle_iolog(struct fio_client *client,
}
/* allocate buffer big enough for next sprintf() call */
}
/* allocate buffer big enough for next sprintf() call */
- log_pathname = malloc( 10 +
- strlen((char * )pdu->name) +
+ log_pathname = malloc(10 + strlen((char *)pdu->name) +
strlen(client->hostname));
if (!log_pathname) {
log_err("fio: memory allocation of unique pathname failed");
strlen(client->hostname));
if (!log_pathname) {
log_err("fio: memory allocation of unique pathname failed");
@@
-1322,7
+1321,7
@@
static int fio_client_handle_iolog(struct fio_client *client,
fd = open((const char *) log_pathname,
O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd < 0) {
fd = open((const char *) log_pathname,
O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd < 0) {
- log_err("fio: open log %s: %s\n",
+ log_err("fio: open log %s: %s\n",
log_pathname, strerror(errno));
return 1;
}
log_pathname, strerror(errno));
return 1;
}
@@
-1341,7
+1340,7
@@
static int fio_client_handle_iolog(struct fio_client *client,
FILE *f;
f = fopen((const char *) log_pathname, "w");
if (!f) {
FILE *f;
f = fopen((const char *) log_pathname, "w");
if (!f) {
- log_err("fio: fopen log %s : %s\n",
+ log_err("fio: fopen log %s : %s\n",
log_pathname, strerror(errno));
return 1;
}
log_pathname, strerror(errno));
return 1;
}