Commit cced37da authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Cyrill Gorcunov

files.c: fix printf format warnings

files.c: In function ‘collect_fd’:
files.c:111:2: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘u64’
files.c: In function ‘open_fd’:
files.c:348:3: error: format ‘%d’ expects type ‘int’, but argument 2 has type ‘u64’
files.c: In function ‘receive_fd’:
files.c:425:5: error: format ‘%d’ expects type ‘int’, but argument 4 has type ‘u64’
files.c:425:5: error: format ‘%d’ expects type ‘int’, but argument 5 has type ‘u64’
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 6c9d6a86
...@@ -108,7 +108,7 @@ static int collect_fd(int pid, struct fdinfo_entry *e) ...@@ -108,7 +108,7 @@ static int collect_fd(int pid, struct fdinfo_entry *e)
struct fdinfo_list_entry *le = &fdinfo_list[nr_fdinfo_list]; struct fdinfo_list_entry *le = &fdinfo_list[nr_fdinfo_list];
struct fdinfo_desc *desc; struct fdinfo_desc *desc;
pr_info("Collect fdinfo pid=%d fd=%d id=%s\n", pid, e->addr, e->id); pr_info("Collect fdinfo pid=%d fd=%ld id=%s\n", pid, e->addr, e->id);
nr_fdinfo_list++; nr_fdinfo_list++;
if ((nr_fdinfo_descs) * sizeof(struct fdinfo_list_entry) >= 4096) { if ((nr_fdinfo_descs) * sizeof(struct fdinfo_list_entry) >= 4096) {
...@@ -345,7 +345,7 @@ static int open_fd(int pid, struct fdinfo_entry *fe, ...@@ -345,7 +345,7 @@ static int open_fd(int pid, struct fdinfo_entry *fe,
snprintf(saddr.sun_path, UNIX_PATH_MAX, snprintf(saddr.sun_path, UNIX_PATH_MAX,
"X/crtools-fd-%d-%d", fle->real_pid, fle->fd); "X/crtools-fd-%d-%d", fle->real_pid, fle->fd);
pr_info("Send fd %d to %s\n", fe->addr, saddr.sun_path + 1); pr_info("Send fd %ld to %s\n", fe->addr, saddr.sun_path + 1);
data.iov_base = &dummy; data.iov_base = &dummy;
data.iov_len = sizeof(dummy); data.iov_len = sizeof(dummy);
...@@ -422,7 +422,7 @@ static int receive_fd(int pid, struct fdinfo_entry *fe, struct fdinfo_desc *fi) ...@@ -422,7 +422,7 @@ static int receive_fd(int pid, struct fdinfo_entry *fe, struct fdinfo_desc *fi)
if (fi->addr != fe->addr) { if (fi->addr != fe->addr) {
tmp = dup2(fi->addr, fe->addr); tmp = dup2(fi->addr, fe->addr);
if (tmp < 0) { if (tmp < 0) {
pr_perror("Can't duplicate fd %d %d", pr_perror("Can't duplicate fd %ld %ld",
fi->addr, fe->addr); fi->addr, fe->addr);
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment