Commit 309b2c18 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

parasite: Rename gen_parasite_saddr @pid to @key

This routine will be used more widely and we will
be generating sockets with name based on some predefined
unique value rather than 'pid', so name argument this
way.

No change on functional level.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent e8bc5ebb
......@@ -325,13 +325,13 @@ static int munmap_seized(struct parasite_ctl *ctl, void *addr, size_t length)
return ret;
}
static int gen_parasite_saddr(struct sockaddr_un *saddr, pid_t pid)
static int gen_parasite_saddr(struct sockaddr_un *saddr, int key)
{
int sun_len;
saddr->sun_family = AF_UNIX;
snprintf(saddr->sun_path, UNIX_PATH_MAX,
"X/crtools-pr-%d", pid);
"X/crtools-pr-%d", key);
sun_len = SUN_LEN(saddr);
*saddr->sun_path = '\0';
......
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