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: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2012-03-21 11:47:00 +04:00 committed by Pavel Emelyanov
parent e8bc5ebbbf
commit 309b2c1877

View file

@ -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';