You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07: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:
committed by
Ingo Molnar
parent
170465ee7f
commit
6e833587e1
@@ -335,11 +335,11 @@ static struct xenbus_driver xenkbd = {
|
||||
|
||||
static int __init xenkbd_init(void)
|
||||
{
|
||||
if (!is_running_on_xen())
|
||||
if (!xen_domain())
|
||||
return -ENODEV;
|
||||
|
||||
/* Nothing to do if running in dom0. */
|
||||
if (is_initial_xendomain())
|
||||
if (xen_initial_domain())
|
||||
return -ENODEV;
|
||||
|
||||
return xenbus_register_frontend(&xenkbd);
|
||||
|
||||
Reference in New Issue
Block a user