Revision 5430a28f hw/vhost_net.c

b/hw/vhost_net.c
81 81
    }
82 82
}
83 83

  
84
struct vhost_net *vhost_net_init(VLANClientState *backend, int devfd)
84
struct vhost_net *vhost_net_init(VLANClientState *backend, int devfd,
85
                                 bool force)
85 86
{
86 87
    int r;
87 88
    struct vhost_net *net = qemu_malloc(sizeof *net);
......
98 99
        (1 << VHOST_NET_F_VIRTIO_NET_HDR);
99 100
    net->backend = r;
100 101

  
101
    r = vhost_dev_init(&net->dev, devfd);
102
    r = vhost_dev_init(&net->dev, devfd, force);
102 103
    if (r < 0) {
103 104
        goto fail;
104 105
    }
......
121 122
    return NULL;
122 123
}
123 124

  
125
bool vhost_net_query(VHostNetState *net, VirtIODevice *dev)
126
{
127
    return vhost_dev_query(&net->dev, dev);
128
}
129

  
124 130
int vhost_net_start(struct vhost_net *net,
125 131
                    VirtIODevice *dev)
126 132
{
......
188 194
    qemu_free(net);
189 195
}
190 196
#else
191
struct vhost_net *vhost_net_init(VLANClientState *backend, int devfd)
197
struct vhost_net *vhost_net_init(VLANClientState *backend, int devfd,
198
                                 bool force)
199
{
200
    return NULL;
201
}
202

  
203
bool vhost_net_query(VHostNetState *net, VirtIODevice *dev)
192 204
{
193
	return NULL;
205
    return false;
194 206
}
195 207

  
196 208
int vhost_net_start(struct vhost_net *net,
197 209
		    VirtIODevice *dev)
198 210
{
199
	return -ENOSYS;
211
    return -ENOSYS;
200 212
}
201 213
void vhost_net_stop(struct vhost_net *net,
202 214
		    VirtIODevice *dev)
......
209 221

  
210 222
unsigned vhost_net_get_features(struct vhost_net *net, unsigned features)
211 223
{
212
	return features;
224
    return features;
213 225
}
214 226
void vhost_net_ack_features(struct vhost_net *net, unsigned features)
215 227
{

Also available in: Unified diff