VirtualBox

Ignore:
Timestamp:
Aug 16, 2010 2:56:22 PM (14 years ago)
Author:
vboxsync
Message:

vboxnetadp: ioctl to unlocked_ioctl transition for 2.6.36 and newer kernels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c

    r31556 r31697  
    6161static int VBoxNetAdpLinuxOpen(struct inode *pInode, struct file *pFilp);
    6262static int VBoxNetAdpLinuxClose(struct inode *pInode, struct file *pFilp);
    63 static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp, unsigned int uCmd, unsigned long ulArg);
     63#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
     64static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp,
     65                                unsigned int uCmd, unsigned long ulArg);
     66#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
     67static long VBoxNetAdpLinuxIOCtlUnlocked(struct file *pFilp, unsigned int uCmd,
     68                                         unsigned long ulArg);
     69#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
    6470
    6571/*******************************************************************************
     
    8490    open:       VBoxNetAdpLinuxOpen,
    8591    release:    VBoxNetAdpLinuxClose,
     92#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
    8693    ioctl:      VBoxNetAdpLinuxIOCtl,
     94#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
     95    unlocked_ioctl: VBoxNetAdpLinuxIOCtlUnlocked,
     96#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
    8797};
    8898
     
    256266 * @param   ulArg       The argument specified to ioctl().
    257267 */
    258 static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp, unsigned int uCmd, unsigned long ulArg)
     268#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
     269static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp,
     270                                unsigned int uCmd, unsigned long ulArg)
     271#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
     272static long VBoxNetAdpLinuxIOCtlUnlocked(struct file *pFilp, unsigned int uCmd,
     273                                         unsigned long ulArg)
     274#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
    259275{
    260276    VBOXNETADPREQ Req;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette