Replace the netfront specific union member in struct file with the
common dev pointer.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
struct evtchn_port_list ports;
} evtchn;
struct gntmap gntmap;
- struct {
- struct netfront_dev *dev;
- } tap;
#ifdef CONFIG_TPMFRONT
struct {
struct tpmfront_dev *dev;
#ifdef CONFIG_NETFRONT
case FTYPE_TAP: {
ssize_t ret;
- ret = netfront_receive(files[fd].tap.dev, buf, nbytes);
+ ret = netfront_receive(files[fd].dev, buf, nbytes);
if (ret <= 0) {
errno = EAGAIN;
return -1;
#endif
#ifdef CONFIG_NETFRONT
case FTYPE_TAP:
- netfront_xmit(files[fd].tap.dev, (void*) buf, nbytes);
+ netfront_xmit(files[fd].dev, (void*) buf, nbytes);
return nbytes;
#endif
#ifdef CONFIG_BLKFRONT
#endif
#ifdef CONFIG_NETFRONT
case FTYPE_TAP:
- shutdown_netfront(files[fd].tap.dev);
+ shutdown_netfront(files[fd].dev);
files[fd].type = FTYPE_NONE;
return 0;
#endif
}
dev->fd = alloc_fd(FTYPE_TAP);
printk("tap_open(%s) -> %d\n", nodename, dev->fd);
- files[dev->fd].tap.dev = dev;
+ files[dev->fd].dev = dev;
return dev->fd;
}
#endif