tun.c (1da177e4c3f41524e886b7f1b8a0c1fc7321cac2) tun.c (b03efcfb2180289718991bb984044ce6c5b7d1b0)
1/*
2 * TUN - Universal TUN/TAP device driver.
3 * Copyright (C) 1999-2002 Maxim Krasnyansky <maxk@qualcomm.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

--- 201 unchanged lines hidden (view full) ---

210
211 if (!tun)
212 return -EBADFD;
213
214 DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name);
215
216 poll_wait(file, &tun->read_wait, wait);
217
1/*
2 * TUN - Universal TUN/TAP device driver.
3 * Copyright (C) 1999-2002 Maxim Krasnyansky <maxk@qualcomm.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

--- 201 unchanged lines hidden (view full) ---

210
211 if (!tun)
212 return -EBADFD;
213
214 DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name);
215
216 poll_wait(file, &tun->read_wait, wait);
217
218 if (skb_queue_len(&tun->readq))
218 if (!skb_queue_empty(&tun->readq))
219 mask |= POLLIN | POLLRDNORM;
220
221 return mask;
222}
223
224/* Get packet from user space buffer */
225static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, size_t count)
226{

--- 657 unchanged lines hidden ---
219 mask |= POLLIN | POLLRDNORM;
220
221 return mask;
222}
223
224/* Get packet from user space buffer */
225static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, size_t count)
226{

--- 657 unchanged lines hidden ---