mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
xen: clean up domain mode predicates
There are four operating modes Xen code may find itself running in: - native - hvm domain - pv dom0 - pv domU Clean up predicates for testing for these states to make them more consistent. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Xen-devel <xen-devel@lists.xensource.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
170465ee7f
commit
6e833587e1
10 changed files with 36 additions and 21 deletions
|
@ -1794,10 +1794,10 @@ static struct xenbus_driver netfront = {
|
|||
|
||||
static int __init netif_init(void)
|
||||
{
|
||||
if (!is_running_on_xen())
|
||||
if (!xen_domain())
|
||||
return -ENODEV;
|
||||
|
||||
if (is_initial_xendomain())
|
||||
if (xen_initial_domain())
|
||||
return 0;
|
||||
|
||||
printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n");
|
||||
|
@ -1809,7 +1809,7 @@ module_init(netif_init);
|
|||
|
||||
static void __exit netif_exit(void)
|
||||
{
|
||||
if (is_initial_xendomain())
|
||||
if (xen_initial_domain())
|
||||
return;
|
||||
|
||||
xenbus_unregister_driver(&netfront);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue