Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 491342
Collapse All | Expand All

(-)a/vmmon-only/linux/driver.c (-22 / +16 lines)
Lines 178-184 static struct vm_operations_struct vmuser_mops = { Link Here
178
#endif
178
#endif
179
};
179
};
180
180
181
static struct file_operations vmuser_fops;
181
static struct file_operations vmuser_fops = {
182
   .owner = THIS_MODULE,
183
   .poll = LinuxDriverPoll,
184
#ifdef HAVE_UNLOCKED_IOCTL
185
   .unlocked_ioctl = LinuxDriver_UnlockedIoctl,
186
#else
187
   .ioctl = LinuxDriver_Ioctl,
188
#endif
189
#ifdef HAVE_COMPAT_IOCTL
190
   .compat_ioctl = LinuxDriver_UnlockedIoctl,
191
#endif
192
   .open = LinuxDriver_Open,
193
   .release = LinuxDriver_Close,
194
   .mmap = LinuxDriverMmap
195
};
196
182
static struct timer_list tscTimer;
197
static struct timer_list tscTimer;
183
198
184
/*
199
/*
Lines 357-383 init_module(void) Link Here
357
   spin_lock_init(&linuxState.pollListLock);
372
   spin_lock_init(&linuxState.pollListLock);
358
#endif
373
#endif
359
374
360
   /*
361
    * Initialize the file_operations structure. Because this code is always
362
    * compiled as a module, this is fine to do it here and not in a static
363
    * initializer.
364
    */
365
366
   memset(&vmuser_fops, 0, sizeof vmuser_fops);
367
   vmuser_fops.owner = THIS_MODULE;
368
   vmuser_fops.poll = LinuxDriverPoll;
369
#ifdef HAVE_UNLOCKED_IOCTL
370
   vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
371
#else
372
   vmuser_fops.ioctl = LinuxDriver_Ioctl;
373
#endif
374
#ifdef HAVE_COMPAT_IOCTL
375
   vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl;
376
#endif
377
   vmuser_fops.open = LinuxDriver_Open;
378
   vmuser_fops.release = LinuxDriver_Close;
379
   vmuser_fops.mmap = LinuxDriverMmap;
380
381
#ifdef VMX86_DEVEL
375
#ifdef VMX86_DEVEL
382
   devel_init_module();
376
   devel_init_module();
383
   linuxState.minor = 0;
377
   linuxState.minor = 0;
(-)a/vmnet-only/driver.c (-23 / +16 lines)
Lines 165-171 static long VNetFileOpUnlockedIoctl(struct file * filp, 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
static struct file_operations vnetFileOps = {
169
   .owner = THIS_MODULE,
170
   .read = VNetFileOpRead,
171
   .write = VNetFileOpWrite,
172
   .poll = VNetFileOpPoll,
173
#ifdef HAVE_UNLOCKED_IOCTL
174
   .unlocked_ioctl = VNetFileOpUnlockedIoctl,
175
#else
176
   .ioctl = VNetFileOpIoctl,
177
#endif
178
#ifdef HAVE_COMPAT_IOCTL
179
   .compat_ioctl = VNetFileOpUnlockedIoctl,
180
#endif
181
   .open = VNetFileOpOpen,
182
   .release = VNetFileOpClose
183
};
169
184
170
/*
185
/*
171
 * Utility functions
186
 * Utility functions
Lines 476-503 init_module(void) Link Here
476
      goto err_proto;
491
      goto err_proto;
477
   }
492
   }
478
493
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);
494
   retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
502
   if (retval) {
495
   if (retval) {
503
      LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n",
496
      LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n",

Return to bug 491342