X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Flib%2Fsyscall_setvhiname-v13.hc;h=2274517c07fab230e0d74a6eca173fe169a03160;hb=842a918cb9bcdd3b1c79dd980d2f9638b0cd6742;hp=2d98099d5b64171177a19fc643e48f540718e29f;hpb=3242ad836f0ad57c45cdeea0429e2cf74c701c34;p=util-vserver.git diff --git a/util-vserver/lib/syscall_setvhiname-v13.hc b/util-vserver/lib/syscall_setvhiname-v13.hc index 2d98099..2274517 100644 --- a/util-vserver/lib/syscall_setvhiname-v13.hc +++ b/util-vserver/lib/syscall_setvhiname-v13.hc @@ -22,10 +22,17 @@ #include + // HACK: workaround naming changes instead of defining yet another interface + // version +#if !defined(VCMD_set_vhi_name) && defined(VCMD_vx_set_vhi_name) +# define VCMD_set_vhi_name VCMD_vx_set_vhi_name +# define vcmd_vhi_name_v0 vcmd_vxi_vhi_name_v0 +#endif + static inline ALWAYSINLINE int vc_set_vhi_name_v13(xid_t xid, vc_uts_type type, char const *val, size_t len) { - struct vcmd_vx_vhi_name_v0 cmd; + struct vcmd_vhi_name_v0 cmd; int rc; if (len>=sizeof(cmd.name)) { @@ -37,7 +44,7 @@ vc_set_vhi_name_v13(xid_t xid, vc_uts_type type, char const *val, size_t len) memcpy(cmd.name, val, len); cmd.name[len] = '\0'; - rc = vserver(VCMD_vx_set_vhi_name, CTX_USER2KERNEL(xid), &cmd); + rc = vserver(VCMD_set_vhi_name, CTX_USER2KERNEL(xid), &cmd); ENSC_FIX_IOCTL(rc); return rc;