Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 384739 | Differences between
and this patch

Collapse All | Expand All

(-)vmnet-only.orig/driver.c (-23 / +21 lines)
Lines 165-171 Link Here
165
                                     unsigned int iocmd, unsigned long ioarg);
165
                                     unsigned int iocmd, unsigned long ioarg);
166
#endif
166
#endif
167
167
168
static struct file_operations vnetFileOps;
168
/*
169
 * Moved file operations initialize here because of incompatibilites
170
 * with Gentoo hardened profile/hardend Linux 3.
171
 */
172
static struct file_operations vnetFileOps = {
173
    .owner = THIS_MODULE,
174
    .read = VNetFileOpRead,
175
    .write = VNetFileOpWrite,
176
    .poll = VNetFileOpPoll,
177
#ifdef HAVE_UNLOCKED_IOCTL
178
    .unlocked_ioctl = VNetFileOpUnlockedIoctl,
179
#else
180
    .ioctl = VNetFileOpIoctl,
181
#endif
182
#ifdef HAVE_COMPAT_IOCTL
183
    .compat_ioctl = VNetFileOpUnlockedIoctl,
184
#endif
185
    .open = VNetFileOpOpen,
186
    .release = VNetFileOpClose,
187
};
188
169
189
170
/*
190
/*
171
 * Utility functions
191
 * Utility functions
Lines 476-503 Link Here
476
      goto err_proto;
496
      goto err_proto;
477
   }
497
   }
478
498
479
   /*
480
    * Initialize the file_operations structure. Because this code is always
481
    * compiled as a module, this is fine to do it here and not in a static
482
    * initializer.
483
    */
484
485
   memset(&vnetFileOps, 0, sizeof vnetFileOps);
486
   vnetFileOps.owner = THIS_MODULE;
487
   vnetFileOps.read = VNetFileOpRead;
488
   vnetFileOps.write = VNetFileOpWrite;
489
   vnetFileOps.poll = VNetFileOpPoll;
490
#ifdef HAVE_UNLOCKED_IOCTL
491
   vnetFileOps.unlocked_ioctl = VNetFileOpUnlockedIoctl;
492
#else
493
   vnetFileOps.ioctl = VNetFileOpIoctl;
494
#endif
495
#ifdef HAVE_COMPAT_IOCTL
496
   vnetFileOps.compat_ioctl = VNetFileOpUnlockedIoctl;
497
#endif
498
   vnetFileOps.open = VNetFileOpOpen;
499
   vnetFileOps.release = VNetFileOpClose;
500
501
   retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
499
   retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
502
   if (retval) {
500
   if (retval) {
503
      LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n",
501
      LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n",

Return to bug 384739