diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-07-21 02:55:36 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2012-07-21 18:21:53 -0400 |
commit | 0dd05a3b60ddf0e216fbd9e5116a5273966fd9db (patch) | |
tree | 43ff17c3511b5cdbb3c8ccc00d24005c3e07aaf5 /drivers/vhost/test.c | |
parent | 186e868786f97c8026f0a81400b451ace306b3a4 (diff) |
vhost: Separate vhost-net features from vhost features
In order for other vhost devices to use the VHOST_FEATURES bits the
vhost-net specific bits need to be moved to their own VHOST_NET_FEATURES
constant.
(Asias: Update drivers/vhost/test.c to use VHOST_NET_FEATURES)
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Zhi Yong Wu <wuzhy@cn.ibm.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Asias He <asias@redhat.com>
Signed-off-by: Nicholas A. Bellinger <nab@risingtidesystems.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/test.c')
-rw-r--r-- | drivers/vhost/test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index 3de00d9fae2e..91d6f060aade 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c | |||
@@ -261,14 +261,14 @@ static long vhost_test_ioctl(struct file *f, unsigned int ioctl, | |||
261 | return -EFAULT; | 261 | return -EFAULT; |
262 | return vhost_test_run(n, test); | 262 | return vhost_test_run(n, test); |
263 | case VHOST_GET_FEATURES: | 263 | case VHOST_GET_FEATURES: |
264 | features = VHOST_FEATURES; | 264 | features = VHOST_NET_FEATURES; |
265 | if (copy_to_user(featurep, &features, sizeof features)) | 265 | if (copy_to_user(featurep, &features, sizeof features)) |
266 | return -EFAULT; | 266 | return -EFAULT; |
267 | return 0; | 267 | return 0; |
268 | case VHOST_SET_FEATURES: | 268 | case VHOST_SET_FEATURES: |
269 | if (copy_from_user(&features, featurep, sizeof features)) | 269 | if (copy_from_user(&features, featurep, sizeof features)) |
270 | return -EFAULT; | 270 | return -EFAULT; |
271 | if (features & ~VHOST_FEATURES) | 271 | if (features & ~VHOST_NET_FEATURES) |
272 | return -EOPNOTSUPP; | 272 | return -EOPNOTSUPP; |
273 | return vhost_test_set_features(n, features); | 273 | return vhost_test_set_features(n, features); |
274 | case VHOST_RESET_OWNER: | 274 | case VHOST_RESET_OWNER: |