[CRIU] [PATCH] files: Rename argument to sock

Cyrill Gorcunov gorcunov at openvz.org
Fri Aug 17 06:15:27 EDT 2012


It's unclear why we've had two different names
for same argument. Moreover, "tsk" is definitely
misnamed feature.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 files.c         |    4 ++--
 include/files.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/files.c b/files.c
index e771553..287cb45 100644
--- a/files.c
+++ b/files.c
@@ -306,7 +306,7 @@ static int open_transport_fd(int pid, struct fdinfo_list_entry *fle)
 	return 0;
 }
 
-int send_fd_to_peer(int fd, struct fdinfo_list_entry *fle, int tsk)
+int send_fd_to_peer(int fd, struct fdinfo_list_entry *fle, int sock)
 {
 	struct sockaddr_un saddr;
 	int len;
@@ -316,7 +316,7 @@ int send_fd_to_peer(int fd, struct fdinfo_list_entry *fle, int tsk)
 	transport_name_gen(&saddr, &len,
 			futex_get(&fle->real_pid), fle->fe->fd);
 	pr_info("\t\tSend fd %d to %s\n", fd, saddr.sun_path + 1);
-	return send_fd(tsk, &saddr, len, fd);
+	return send_fd(sock, &saddr, len, fd);
 }
 
 static int open_fd(int pid, FdinfoEntry *fe, struct file_desc *d)
diff --git a/include/files.h b/include/files.h
index 8572766..a9d3df5 100644
--- a/include/files.h
+++ b/include/files.h
@@ -77,7 +77,7 @@ extern void file_desc_add(struct file_desc *d, u32 id, struct file_desc_ops *ops
 extern struct fdinfo_list_entry *file_master(struct file_desc *d);
 extern struct file_desc *find_file_desc_raw(int type, u32 id);
 
-extern int send_fd_to_peer(int fd, struct fdinfo_list_entry *fle, int transport);
+extern int send_fd_to_peer(int fd, struct fdinfo_list_entry *fle, int sock);
 extern int restore_fown(int fd, FownEntry *fown);
 extern int rst_file_params(int fd, FownEntry *fown, int flags);
 
-- 
1.7.7.6



More information about the CRIU mailing list