Allow a domain to specify DOMID_SELF to DOM0_GETDOMAININFO dom0_op.

This is primarily useful to allow a privileged domain to determine
its domid, where the preferred method of quering xenstore cannot be
used.

Signed-off-by: joseph.cihula@intel.com
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2005-12-18 20:27:42 +01:00
1 parent 2cafb4b4e9
commit 310773bcd1
1 file changed
+6 -1
+6 -1
View File
@@ -358,12 +358,17 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
case DOM0_GETDOMAININFO:
{
struct domain *d;
domid_t dom;
dom = op->u.getdomaininfo.domain;
if ( dom == DOMID_SELF )
dom = current->domain->domain_id;
read_lock(&domlist_lock);
for_each_domain ( d )
{
if ( d->domain_id >= op->u.getdomaininfo.domain )
if ( d->domain_id >= dom )
break;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.