From: Stephen Soltesz Date: Sat, 9 Mar 2013 22:16:27 +0000 (-0500) Subject: trim capability prefix to allow setting single bit X-Git-Tag: util-vserver-pl-0.4-29~1 X-Git-Url: http://git.onelab.eu/?p=util-vserver-pl.git;a=commitdiff_plain;h=b3e6c1ed03bc50f25d03ca8f13aa5bca7419206f;hp=b3e6c1ed03bc50f25d03ca8f13aa5bca7419206f trim capability prefix to allow setting single bit M-Lab has added a new ccapability to enable/disable web100 statistics collection per vserver. vserverimpl.text2ccaps() recognizes strings such as "raw_icmp", "vxc_raw_icmp", and "^28" to set a specific bit in the CCaps bit field, but it does not recognize "vxc_^28". All bcap and ccap names defined by util-vserver are recognized with or without the cap_ and vxc_ prefixes. So, this patch will allow an administrator to enable arbitrary bit fields in the CCaps or BCaps of a vserver without harming compatibility with existing capabilities. The admin would add, for example vxc_^28 or cap_^28, to the 'capabililties' slice tag and the prefixes would be stripped before being passed to text2*caps() as simply "^28". ---