|
Lines 264-274
Link Here
|
| 264 |
struct file * filp) // IN: |
264 |
struct file * filp) // IN: |
| 265 |
{ |
265 |
{ |
| 266 |
int ret = -ENOTTY; |
266 |
int ret = -ENOTTY; |
| 267 |
|
267 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) |
| 268 |
if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) { |
268 |
if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) { |
| 269 |
ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg); |
269 |
ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg); |
| 270 |
} |
270 |
} |
| 271 |
return ret; |
271 |
return ret; |
|
|
272 |
#else |
| 273 |
if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) { |
| 274 |
ret = VNetFileOpIoctl(filp->f_path.dentry->d_inode, filp, iocmd, ioarg); |
| 275 |
} |
| 276 |
return ret; |
| 277 |
#endif |
| 272 |
} |
278 |
} |
| 273 |
|
279 |
|
| 274 |
|
280 |
|
|
Lines 1191-1201
Link Here
|
| 1191 |
struct inode *inode = NULL; |
1197 |
struct inode *inode = NULL; |
| 1192 |
long err; |
1198 |
long err; |
| 1193 |
|
1199 |
|
| 1194 |
if (filp && filp->f_dentry) { |
1200 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) |
| 1195 |
inode = filp->f_dentry->d_inode; |
1201 |
if (filp && filp->f_dentry) { |
| 1196 |
} |
1202 |
inode = filp->f_dentry->d_inode; |
| 1197 |
err = VNetFileOpIoctl(inode, filp, iocmd, ioarg); |
1203 |
} |
| 1198 |
return err; |
1204 |
err = VNetFileOpIoctl(inode, filp, iocmd, ioarg); |
|
|
1205 |
return err; |
| 1206 |
#else |
| 1207 |
if (filp && filp->f_path.dentry) { |
| 1208 |
inode = filp->f_path.dentry->d_inode; |
| 1209 |
} |
| 1210 |
err = VNetFileOpIoctl(inode, filp, iocmd, ioarg); |
| 1211 |
return err; |
| 1212 |
#endif |
| 1213 |
|
| 1199 |
} |
1214 |
} |
| 1200 |
#endif |
1215 |
#endif |
| 1201 |
|
1216 |
|