4 #define __NR_vserver 273
6 #include <sys/syscall.h>
11 #define VC_CMD(c, i, v) (((c & 0x3F) << 24) \
12 | (((i) & 0xFF) << 16) | ((v) & 0xFFF))
13 #define VC_CMD_GET_VHI_NAME VC_CMD(2,2,0)
15 struct vhi_name_struct {
30 uint32_t vserver(uint32_t cmd, uint32_t id, void *data)
32 return syscall(__NR_vserver, cmd, id, data);
35 static char stack_poison=0;
37 uint32_t get_vhi_name(uint32_t xid) {
38 struct vhi_name_struct cmd;
39 cmd.field = VHIN_CONTEXT;
40 cmd.name[0]=stack_poison++;
42 if (vserver(VC_CMD_GET_VHI_NAME, xid, &cmd))
44 return (*((uint32_t *) cmd.name));