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

(-)a/vmmon-only/linux/driver.c (-16 / +10 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
   .unlocked_ioctl = LinuxDriver_Ioctl,
185
   .compat_ioctl = LinuxDriver_Ioctl,
186
   .open = LinuxDriver_Open,
187
   .release = LinuxDriver_Close,
188
   .mmap = LinuxDriverMmap
189
};
190
182
static struct timer_list tscTimer;
191
static struct timer_list tscTimer;
183
static Atomic_uint32 tsckHz;
192
static Atomic_uint32 tsckHz;
184
static VmTimeStart tsckHzStartTime;
193
static VmTimeStart tsckHzStartTime;
Lines 357-377 init_module(void) Link Here
357
   linuxState.fastClockPriority = -20;
372
   linuxState.fastClockPriority = -20;
358
   linuxState.swapSize = VMMON_UNKNOWN_SWAP_SIZE;
373
   linuxState.swapSize = VMMON_UNKNOWN_SWAP_SIZE;
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
   vmuser_fops.unlocked_ioctl = LinuxDriver_Ioctl;
370
   vmuser_fops.compat_ioctl = LinuxDriver_Ioctl;
371
   vmuser_fops.open = LinuxDriver_Open;
372
   vmuser_fops.release = LinuxDriver_Close;
373
   vmuser_fops.mmap = LinuxDriverMmap;
374
375
#ifdef VMX86_DEVEL
375
#ifdef VMX86_DEVEL
376
   devel_init_module();
376
   devel_init_module();
377
   linuxState.minor = 0;
377
   linuxState.minor = 0;
(-)a/vmnet-only/driver.c (-17 / +10 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
   .unlocked_ioctl = VNetFileOpUnlockedIoctl,
174
   .compat_ioctl = VNetFileOpUnlockedIoctl,
175
   .open = VNetFileOpOpen,
176
   .release = VNetFileOpClose
177
};
169
178
170
/*
179
/*
171
 * Utility functions
180
 * Utility functions
Lines 476-497 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
   vnetFileOps.unlocked_ioctl = VNetFileOpUnlockedIoctl;
491
   vnetFileOps.compat_ioctl = VNetFileOpUnlockedIoctl;
492
   vnetFileOps.open = VNetFileOpOpen;
493
   vnetFileOps.release = VNetFileOpClose;
494
495
   retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
494
   retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
496
   if (retval) {
495
   if (retval) {
497
      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 561614