# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxxx
# Date 1169836720 0
# Node ID 271ffb1c12ebc1375386a41598a7b3ae72f16871
# Parent 32fd32bbf78d094e96027e3cea05fcbd92fee7a5
Rename find_domain_by_id() to get_domain_by_id().
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
xen/acm/acm_core.c | 2 -
xen/acm/acm_simple_type_enforcement_hooks.c | 14 +++++------
xen/arch/ia64/vmx/vmmu.c | 2 -
xen/arch/ia64/vmx/vmx_hypercall.c | 6 ++--
xen/arch/ia64/xen/dom0_ops.c | 8 +++---
xen/arch/ia64/xen/mm.c | 4 +--
xen/arch/powerpc/domctl.c | 6 ++--
xen/arch/x86/domctl.c | 20 ++++++++--------
xen/arch/x86/hvm/hvm.c | 8 +++---
xen/arch/x86/mm.c | 6 ++--
xen/common/acm_ops.c | 6 ++--
xen/common/domain.c | 2 -
xen/common/domctl.c | 34 ++++++++++++++--------------
xen/common/event_channel.c | 8 +++---
xen/common/grant_table.c | 14 +++++------
xen/common/memory.c | 6 ++--
xen/common/schedule.c | 2 -
xen/common/xenoprof.c | 4 +--
xen/include/acm/acm_hooks.h | 2 -
xen/include/xen/sched.h | 2 -
20 files changed, 78 insertions(+), 78 deletions(-)
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/acm/acm_core.c
--- a/xen/acm/acm_core.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/acm/acm_core.c Fri Jan 26 18:38:40 2007 +0000
@@ -276,7 +276,7 @@ acm_init_domain_ssid(domid_t id, ssidref
acm_init_domain_ssid(domid_t id, ssidref_t ssidref)
{
struct acm_ssid_domain *ssid;
- struct domain *subj = find_domain_by_id(id);
+ struct domain *subj = get_domain_by_id(id);
int ret1, ret2;
if (subj == NULL)
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/acm/acm_simple_type_enforcement_hooks.c
--- a/xen/acm/acm_simple_type_enforcement_hooks.c Fri Jan 26 18:34:36
2007 +0000
+++ b/xen/acm/acm_simple_type_enforcement_hooks.c Fri Jan 26 18:38:40
2007 +0000
@@ -205,7 +205,7 @@ ste_init_state(struct acm_ste_policy_buf
ste_rssidref = ste_rssid->ste_ssidref;
} else if ((*pd)->evtchn[port]->state == ECS_UNBOUND) {
rdomid = (*pd)->evtchn[port]->u.unbound.remote_domid;
- if ((rdom = find_domain_by_id(rdomid)) == NULL) {
+ if ((rdom = get_domain_by_id(rdomid)) == NULL) {
printk("%s: Error finding domain to id %x!\n", __func__,
rdomid);
goto out;
}
@@ -245,7 +245,7 @@ ste_init_state(struct acm_ste_policy_buf
__func__, (*pd)->domain_id, i, sha_copy.flags,
sha_copy.domid,
(unsigned long)sha_copy.frame);
rdomid = sha_copy.domid;
- if ((rdom = find_domain_by_id(rdomid)) == NULL) {
+ if ((rdom = get_domain_by_id(rdomid)) == NULL) {
printkd("%s: domain not found ERROR!\n", __func__);
goto out;
};
@@ -507,8 +507,8 @@ ste_pre_eventchannel_unbound(domid_t id1
if (id1 == DOMID_SELF) id1 = current->domain->domain_id;
if (id2 == DOMID_SELF) id2 = current->domain->domain_id;
- subj = find_domain_by_id(id1);
- obj = find_domain_by_id(id2);
+ subj = get_domain_by_id(id1);
+ obj = get_domain_by_id(id2);
if ((subj == NULL) || (obj == NULL)) {
ret = ACM_ACCESS_DENIED;
goto out;
@@ -552,7 +552,7 @@ ste_pre_eventchannel_interdomain(domid_t
if (id == DOMID_SELF) id = current->domain->domain_id;
subj = current->domain;
- obj = find_domain_by_id(id);
+ obj = get_domain_by_id(id);
if (obj == NULL) {
ret = ACM_ACCESS_DENIED;
goto out;
@@ -595,7 +595,7 @@ ste_pre_grant_map_ref (domid_t id) {
}
atomic_inc(&ste_bin_pol.gt_eval_count);
subj = current->domain;
- obj = find_domain_by_id(id);
+ obj = get_domain_by_id(id);
if (share_common_type(subj, obj)) {
cache_result(subj, obj);
@@ -633,7 +633,7 @@ ste_pre_grant_setup (domid_t id) {
}
/* b) check types */
subj = current->domain;
- obj = find_domain_by_id(id);
+ obj = get_domain_by_id(id);
if (share_common_type(subj, obj)) {
cache_result(subj, obj);
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/arch/ia64/vmx/vmmu.c Fri Jan 26 18:38:40 2007 +0000
@@ -49,7 +49,7 @@ u64 get_mfn(struct domain *d, u64 gpfn)
d = current->domain;
}
else {
- d = find_domain_by_id(domid);
+ d = get_domain_by_id(domid);
}
*/
xen_gppn = arch_to_xen_ppn(gpfn);
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/arch/ia64/vmx/vmx_hypercall.c
--- a/xen/arch/ia64/vmx/vmx_hypercall.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/arch/ia64/vmx/vmx_hypercall.c Fri Jan 26 18:38:40 2007 +0000
@@ -53,7 +53,7 @@ static int hvmop_set_isa_irq_level(
if ( op.isa_irq > 15 )
return -EINVAL;
- d = find_domain_by_id(op.domid);
+ d = get_domain_by_id(op.domid);
if ( d == NULL )
return -ESRCH;
@@ -85,7 +85,7 @@ static int hvmop_set_pci_intx_level(
if ( (op.domain > 0) || (op.bus > 0) || (op.device > 31) || (op.intx > 3) )
return -EINVAL;
- d = find_domain_by_id(op.domid);
+ d = get_domain_by_id(op.domid);
if ( d == NULL )
return -ESRCH;
@@ -126,7 +126,7 @@ do_hvm_op(unsigned long op, XEN_GUEST_HA
d = current->domain;
}
else if (IS_PRIV(current->domain)) {
- d = find_domain_by_id(a.domid);
+ d = get_domain_by_id(a.domid);
if (d == NULL)
return -ESRCH;
}
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/arch/ia64/xen/dom0_ops.c Fri Jan 26 18:38:40 2007 +0000
@@ -40,7 +40,7 @@ long arch_do_domctl(xen_domctl_t *op, XE
case XEN_DOMCTL_getmemlist:
{
unsigned long i;
- struct domain *d = find_domain_by_id(op->domain);
+ struct domain *d = get_domain_by_id(op->domain);
unsigned long start_page = op->u.getmemlist.start_pfn;
unsigned long nr_pages = op->u.getmemlist.max_pfns;
uint64_t mfn;
@@ -76,7 +76,7 @@ long arch_do_domctl(xen_domctl_t *op, XE
case XEN_DOMCTL_arch_setup:
{
xen_domctl_arch_setup_t *ds = &op->u.arch_setup;
- struct domain *d = find_domain_by_id(op->domain);
+ struct domain *d = get_domain_by_id(op->domain);
if ( d == NULL) {
ret = -EINVAL;
@@ -140,7 +140,7 @@ long arch_do_domctl(xen_domctl_t *op, XE
{
struct domain *d;
ret = -ESRCH;
- d = find_domain_by_id(op->domain);
+ d = get_domain_by_id(op->domain);
if ( d != NULL )
{
ret = shadow_mode_control(d, &op->u.shadow_op);
@@ -158,7 +158,7 @@ long arch_do_domctl(xen_domctl_t *op, XE
unsigned int lp = fp + np - 1;
ret = -ESRCH;
- d = find_domain_by_id(op->domain);
+ d = get_domain_by_id(op->domain);
if (unlikely(d == NULL))
break;
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/arch/ia64/xen/mm.c Fri Jan 26 18:38:40 2007 +0000
@@ -1274,7 +1274,7 @@ __dom0vp_add_physmap(struct domain* d, u
if (flags & (ASSIGN_nocache | ASSIGN_pgc_allocated))
return -EINVAL;
- rd = find_domain_by_id(domid);
+ rd = get_domain_by_id(domid);
if (unlikely(rd == NULL)) {
switch (domid) {
case DOMID_XEN:
@@ -2055,7 +2055,7 @@ arch_memory_op(int op, XEN_GUEST_HANDLE(
}
else if (!IS_PRIV(current->domain))
return -EPERM;
- else if ((d = find_domain_by_id(xatp.domid)) == NULL)
+ else if ((d = get_domain_by_id(xatp.domid)) == NULL)
return -ESRCH;
/* This hypercall is used for VT-i domain only */
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/arch/powerpc/domctl.c
--- a/xen/arch/powerpc/domctl.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/arch/powerpc/domctl.c Fri Jan 26 18:38:40 2007 +0000
@@ -47,7 +47,7 @@ long arch_do_domctl(struct xen_domctl *d
case XEN_DOMCTL_getmemlist:
{
int i;
- struct domain *d = find_domain_by_id(domctl->domain);
+ struct domain *d = get_domain_by_id(domctl->domain);
unsigned long max_pfns = domctl->u.getmemlist.max_pfns;
uint64_t mfn;
struct list_head *list_ent;
@@ -84,7 +84,7 @@ long arch_do_domctl(struct xen_domctl *d
{
struct domain *d;
ret = -ESRCH;
- d = find_domain_by_id(domctl->domain);
+ d = get_domain_by_id(domctl->domain);
if ( d != NULL )
{
ret = shadow_domctl(d, &domctl->u.shadow_op, u_domctl);
@@ -99,7 +99,7 @@ long arch_do_domctl(struct xen_domctl *d
unsigned int order = domctl->u.real_mode_area.log - PAGE_SHIFT;
ret = -ESRCH;
- d = find_domain_by_id(domctl->domain);
+ d = get_domain_by_id(domctl->domain);
if (d != NULL) {
ret = -EINVAL;
if (cpu_rma_valid(order))
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/arch/x86/domctl.c Fri Jan 26 18:38:40 2007 +0000
@@ -39,7 +39,7 @@ long arch_do_domctl(
{
struct domain *d;
ret = -ESRCH;
- d = find_domain_by_id(domctl->domain);
+ d = get_domain_by_id(domctl->domain);
if ( d != NULL )
{
ret = shadow_domctl(d,
@@ -62,7 +62,7 @@ long arch_do_domctl(
break;
ret = -ESRCH;
- if ( unlikely((d = find_domain_by_id(domctl->domain)) == NULL) )
+ if ( unlikely((d = get_domain_by_id(domctl->domain)) == NULL) )
break;
if ( np == 0 )
@@ -86,7 +86,7 @@ long arch_do_domctl(
ret = -EINVAL;
if ( unlikely(!mfn_valid(mfn)) ||
- unlikely((d = find_domain_by_id(dom)) == NULL) )
+ unlikely((d = get_domain_by_id(dom)) == NULL) )
break;
page = mfn_to_page(mfn);
@@ -134,7 +134,7 @@ long arch_do_domctl(
uint32_t *arr32;
ret = -ESRCH;
- if ( unlikely((d = find_domain_by_id(dom)) == NULL) )
+ if ( unlikely((d = get_domain_by_id(dom)) == NULL) )
break;
if ( unlikely(num > 1024) )
@@ -217,7 +217,7 @@ long arch_do_domctl(
case XEN_DOMCTL_getmemlist:
{
int i;
- struct domain *d = find_domain_by_id(domctl->domain);
+ struct domain *d = get_domain_by_id(domctl->domain);
unsigned long max_pfns = domctl->u.getmemlist.max_pfns;
uint64_t mfn;
struct list_head *list_ent;
@@ -255,7 +255,7 @@ long arch_do_domctl(
case XEN_DOMCTL_hypercall_init:
{
- struct domain *d = find_domain_by_id(domctl->domain);
+ struct domain *d = get_domain_by_id(domctl->domain);
unsigned long gmfn = domctl->u.hypercall_init.gmfn;
unsigned long mfn;
void *hypercall_page;
@@ -293,7 +293,7 @@ long arch_do_domctl(
struct vcpu *v;
ret = -ESRCH;
- if ( (d = find_domain_by_id(domctl->domain)) == NULL )
+ if ( (d = get_domain_by_id(domctl->domain)) == NULL )
break;
ret = -ENOMEM;
@@ -324,7 +324,7 @@ long arch_do_domctl(
struct vcpu *v;
ret = -ESRCH;
- if ( (d = find_domain_by_id(domctl->domain)) == NULL )
+ if ( (d = get_domain_by_id(domctl->domain)) == NULL )
break;
ret = -ENOMEM;
@@ -360,7 +360,7 @@ long arch_do_domctl(
struct domain *d;
ret = -ESRCH;
- if ( (d = find_domain_by_id(domctl->domain)) == NULL )
+ if ( (d = get_domain_by_id(domctl->domain)) == NULL )
break;
switch ( domctl->u.address_size.size )
@@ -386,7 +386,7 @@ long arch_do_domctl(
struct domain *d;
ret = -ESRCH;
- if ( (d = find_domain_by_id(domctl->domain)) == NULL )
+ if ( (d = get_domain_by_id(domctl->domain)) == NULL )
break;
domctl->u.address_size.size = BITS_PER_GUEST_LONG(d);
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/arch/x86/hvm/hvm.c Fri Jan 26 18:38:40 2007 +0000
@@ -674,7 +674,7 @@ static int hvmop_set_pci_intx_level(
if ( (op.domain > 0) || (op.bus > 0) || (op.device > 31) || (op.intx > 3) )
return -EINVAL;
- d = find_domain_by_id(op.domid);
+ d = get_domain_by_id(op.domid);
if ( d == NULL )
return -ESRCH;
@@ -717,7 +717,7 @@ static int hvmop_set_isa_irq_level(
if ( op.isa_irq > 15 )
return -EINVAL;
- d = find_domain_by_id(op.domid);
+ d = get_domain_by_id(op.domid);
if ( d == NULL )
return -ESRCH;
@@ -760,7 +760,7 @@ static int hvmop_set_pci_link_route(
if ( (op.link > 3) || (op.isa_irq > 15) )
return -EINVAL;
- d = find_domain_by_id(op.domid);
+ d = get_domain_by_id(op.domid);
if ( d == NULL )
return -ESRCH;
@@ -805,7 +805,7 @@ long do_hvm_op(unsigned long op, XEN_GUE
}
else if ( IS_PRIV(current->domain) )
{
- d = find_domain_by_id(a.domid);
+ d = get_domain_by_id(a.domid);
if ( d == NULL )
return -ESRCH;
}
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/arch/x86/mm.c Fri Jan 26 18:38:40 2007 +0000
@@ -1882,7 +1882,7 @@ static int set_foreigndom(domid_t domid)
}
else
{
- info->foreign = e = find_domain_by_id(domid);
+ info->foreign = e = get_domain_by_id(domid);
if ( e == NULL )
{
switch ( domid )
@@ -2963,7 +2963,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
}
else if ( !IS_PRIV(current->domain) )
return -EPERM;
- else if ( (d = find_domain_by_id(xatp.domid)) == NULL )
+ else if ( (d = get_domain_by_id(xatp.domid)) == NULL )
return -ESRCH;
switch ( xatp.space )
@@ -3034,7 +3034,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
}
else if ( !IS_PRIV(current->domain) )
return -EPERM;
- else if ( (d = find_domain_by_id(fmap.domid)) == NULL )
+ else if ( (d = get_domain_by_id(fmap.domid)) == NULL )
return -ESRCH;
rc = copy_from_guest(&d->arch.e820[0], fmap.map.buffer,
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/common/acm_ops.c
--- a/xen/common/acm_ops.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/common/acm_ops.c Fri Jan 26 18:38:40 2007 +0000
@@ -115,7 +115,7 @@ ret_t do_acm_op(int cmd, XEN_GUEST_HANDL
ssidref = getssid.id.ssidref;
else if (getssid.get_ssid_by == ACM_GETBY_domainid)
{
- struct domain *subj = find_domain_by_id(getssid.id.domainid);
+ struct domain *subj = get_domain_by_id(getssid.id.domainid);
if (!subj)
{
rc = -ESRCH; /* domain not found */
@@ -152,7 +152,7 @@ ret_t do_acm_op(int cmd, XEN_GUEST_HANDL
ssidref1 = getdecision.id1.ssidref;
else if (getdecision.get_decision_by1 == ACM_GETBY_domainid)
{
- struct domain *subj = find_domain_by_id(getdecision.id1.domainid);
+ struct domain *subj = get_domain_by_id(getdecision.id1.domainid);
if (!subj)
{
rc = -ESRCH; /* domain not found */
@@ -176,7 +176,7 @@ ret_t do_acm_op(int cmd, XEN_GUEST_HANDL
ssidref2 = getdecision.id2.ssidref;
else if (getdecision.get_decision_by2 == ACM_GETBY_domainid)
{
- struct domain *subj = find_domain_by_id(getdecision.id2.domainid);
+ struct domain *subj = get_domain_by_id(getdecision.id2.domainid);
if (!subj)
{
rc = -ESRCH; /* domain not found */
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/common/domain.c
--- a/xen/common/domain.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/common/domain.c Fri Jan 26 18:38:40 2007 +0000
@@ -203,7 +203,7 @@ struct domain *domain_create(domid_t dom
}
-struct domain *find_domain_by_id(domid_t dom)
+struct domain *get_domain_by_id(domid_t dom)
{
struct domain *d;
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/common/domctl.c
--- a/xen/common/domctl.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/common/domctl.c Fri Jan 26 18:38:40 2007 +0000
@@ -73,7 +73,7 @@ static inline int is_free_domid(domid_t
if ( dom >= DOMID_FIRST_RESERVED )
return 0;
- if ( (d = find_domain_by_id(dom)) == NULL )
+ if ( (d = get_domain_by_id(dom)) == NULL )
return 1;
put_domain(d);
@@ -196,7 +196,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
case XEN_DOMCTL_setvcpucontext:
{
- struct domain *d = find_domain_by_id(op->domain);
+ struct domain *d = get_domain_by_id(op->domain);
vcpu_guest_context_u c = { .nat = NULL };
unsigned int vcpu = op->u.vcpucontext.vcpu;
struct vcpu *v;
@@ -248,7 +248,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
case XEN_DOMCTL_pausedomain:
{
- struct domain *d = find_domain_by_id(op->domain);
+ struct domain *d = get_domain_by_id(op->domain);
ret = -ESRCH;
if ( d != NULL )
{
@@ -265,7 +265,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
case XEN_DOMCTL_unpausedomain:
{
- struct domain *d = find_domain_by_id(op->domain);
+ struct domain *d = get_domain_by_id(op->domain);
ret = -ESRCH;
if ( d != NULL )
{
@@ -283,7 +283,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
case XEN_DOMCTL_resumedomain:
{
- struct domain *d = find_domain_by_id(op->domain);
+ struct domain *d = get_domain_by_id(op->domain);
struct vcpu *v;
ret = -ESRCH;
@@ -367,7 +367,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
break;
ret = -ESRCH;
- if ( (d = find_domain_by_id(op->domain)) == NULL )
+ if ( (d = get_domain_by_id(op->domain)) == NULL )
break;
/* Needed, for example, to ensure writable p.t. state is synced. */
@@ -402,7 +402,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
case XEN_DOMCTL_destroydomain:
{
- struct domain *d = find_domain_by_id(op->domain);
+ struct domain *d = get_domain_by_id(op->domain);
ret = -ESRCH;
if ( d != NULL )
{
@@ -421,7 +421,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
case XEN_DOMCTL_getvcpuaffinity:
{
domid_t dom = op->domain;
- struct domain *d = find_domain_by_id(dom);
+ struct domain *d = get_domain_by_id(dom);
struct vcpu *v;
cpumask_t new_affinity;
@@ -460,7 +460,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
struct domain *d;
ret = -ESRCH;
- if ( (d = find_domain_by_id(op->domain)) == NULL )
+ if ( (d = get_domain_by_id(op->domain)) == NULL )
break;
ret = sched_adjust(d, &op->u.scheduler_op);
@@ -514,7 +514,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
struct vcpu *v;
ret = -ESRCH;
- if ( (d = find_domain_by_id(op->domain)) == NULL )
+ if ( (d = get_domain_by_id(op->domain)) == NULL )
break;
ret = -EINVAL;
@@ -570,7 +570,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
struct vcpu_runstate_info runstate;
ret = -ESRCH;
- if ( (d = find_domain_by_id(op->domain)) == NULL )
+ if ( (d = get_domain_by_id(op->domain)) == NULL )
break;
ret = -EINVAL;
@@ -604,7 +604,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
unsigned long new_max;
ret = -ESRCH;
- d = find_domain_by_id(op->domain);
+ d = get_domain_by_id(op->domain);
if ( d == NULL )
break;
@@ -627,7 +627,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
{
struct domain *d;
ret = -ESRCH;
- d = find_domain_by_id(op->domain);
+ d = get_domain_by_id(op->domain);
if ( d != NULL )
{
memcpy(d->handle, op->u.setdomainhandle.handle,
@@ -642,7 +642,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
{
struct domain *d;
ret = -ESRCH;
- d = find_domain_by_id(op->domain);
+ d = get_domain_by_id(op->domain);
if ( d != NULL )
{
if ( op->u.setdebugging.enable )
@@ -665,7 +665,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
break;
ret = -ESRCH;
- d = find_domain_by_id(op->domain);
+ d = get_domain_by_id(op->domain);
if ( d == NULL )
break;
@@ -689,7 +689,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
break;
ret = -ESRCH;
- d = find_domain_by_id(op->domain);
+ d = get_domain_by_id(op->domain);
if ( d == NULL )
break;
@@ -707,7 +707,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
struct domain *d;
ret = -ESRCH;
- d = find_domain_by_id(op->domain);
+ d = get_domain_by_id(op->domain);
if ( d != NULL )
{
d->time_offset_seconds = op->u.settimeoffset.time_offset_seconds;
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/common/event_channel.c
--- a/xen/common/event_channel.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/common/event_channel.c Fri Jan 26 18:38:40 2007 +0000
@@ -112,7 +112,7 @@ static long evtchn_alloc_unbound(evtchn_
else if ( !IS_PRIV(current->domain) )
return -EPERM;
- if ( (d = find_domain_by_id(dom)) == NULL )
+ if ( (d = get_domain_by_id(dom)) == NULL )
return -ESRCH;
spin_lock(&d->evtchn_lock);
@@ -150,7 +150,7 @@ static long evtchn_bind_interdomain(evtc
if ( rdom == DOMID_SELF )
rdom = current->domain->domain_id;
- if ( (rd = find_domain_by_id(rdom)) == NULL )
+ if ( (rd = get_domain_by_id(rdom)) == NULL )
return -ESRCH;
/* Avoid deadlock by first acquiring lock of domain with smaller id. */
@@ -598,7 +598,7 @@ static long evtchn_status(evtchn_status_
else if ( !IS_PRIV(current->domain) )
return -EPERM;
- if ( (d = find_domain_by_id(dom)) == NULL )
+ if ( (d = get_domain_by_id(dom)) == NULL )
return -ESRCH;
spin_lock(&d->evtchn_lock);
@@ -746,7 +746,7 @@ static long evtchn_reset(evtchn_reset_t
else if ( !IS_PRIV(current->domain) )
return -EPERM;
- if ( (d = find_domain_by_id(dom)) == NULL )
+ if ( (d = get_domain_by_id(dom)) == NULL )
return -ESRCH;
for ( i = 0; port_is_valid(d, i); i++ )
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/common/grant_table.c
--- a/xen/common/grant_table.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/common/grant_table.c Fri Jan 26 18:38:40 2007 +0000
@@ -123,7 +123,7 @@ __gnttab_map_grant_ref(
return;
}
- if ( unlikely((rd = find_domain_by_id(op->dom)) == NULL) )
+ if ( unlikely((rd = get_domain_by_id(op->dom)) == NULL) )
{
if ( rd != NULL )
put_domain(rd);
@@ -369,7 +369,7 @@ __gnttab_unmap_grant_ref(
ref = map->ref;
flags = map->flags;
- if ( unlikely((rd = find_domain_by_id(dom)) == NULL) )
+ if ( unlikely((rd = get_domain_by_id(dom)) == NULL) )
{
/* This can happen when a grant is implicitly unmapped. */
gdprintk(XENLOG_INFO, "Could not find domain %d\n", dom);
@@ -516,7 +516,7 @@ gnttab_setup_table(
goto out;
}
- if ( unlikely((d = find_domain_by_id(dom)) == NULL) )
+ if ( unlikely((d = get_domain_by_id(dom)) == NULL) )
{
gdprintk(XENLOG_INFO, "Bad domid %d.\n", dom);
op.status = GNTST_bad_domain;
@@ -653,7 +653,7 @@ gnttab_transfer(
}
/* Find the target domain. */
- if ( unlikely((e = find_domain_by_id(gop.domid)) == NULL) )
+ if ( unlikely((e = get_domain_by_id(gop.domid)) == NULL) )
{
gdprintk(XENLOG_INFO, "gnttab_transfer: can't find domain %d\n",
gop.domid);
@@ -866,7 +866,7 @@ __gnttab_copy(
sd = current->domain;
get_knownalive_domain(sd);
}
- else if ( (sd = find_domain_by_id(op->source.domid)) == NULL )
+ else if ( (sd = get_domain_by_id(op->source.domid)) == NULL )
{
PIN_FAIL(error_out, GNTST_bad_domain,
"couldn't find %d\n", op->source.domid);
@@ -877,7 +877,7 @@ __gnttab_copy(
dd = current->domain;
get_knownalive_domain(dd);
}
- else if ( (dd = find_domain_by_id(op->dest.domid)) == NULL )
+ else if ( (dd = get_domain_by_id(op->dest.domid)) == NULL )
{
PIN_FAIL(error_out, GNTST_bad_domain,
"couldn't find %d\n", op->dest.domid);
@@ -1132,7 +1132,7 @@ gnttab_release_mappings(
"flags:(%x) dom:(%hu)\n",
handle, ref, map->flags, map->domid);
- rd = find_domain_by_id(map->domid);
+ rd = get_domain_by_id(map->domid);
if ( rd == NULL )
{
/* Nothing to clear up... */
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/common/memory.c
--- a/xen/common/memory.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/common/memory.c Fri Jan 26 18:38:40 2007 +0000
@@ -242,7 +242,7 @@ static long translate_gpfn_list(
else if ( !IS_PRIV(current->domain) )
return -EPERM;
- if ( (d = find_domain_by_id(op.domid)) == NULL )
+ if ( (d = get_domain_by_id(op.domid)) == NULL )
return -ESRCH;
if ( !shadow_mode_translate(d) )
@@ -543,7 +543,7 @@ long do_memory_op(unsigned long cmd, XEN
if ( likely(reservation.domid == DOMID_SELF) )
d = current->domain;
else if ( !IS_PRIV(current->domain) ||
- ((d = find_domain_by_id(reservation.domid)) == NULL) )
+ ((d = get_domain_by_id(reservation.domid)) == NULL) )
return start_extent;
args.domain = d;
@@ -589,7 +589,7 @@ long do_memory_op(unsigned long cmd, XEN
d = current->domain;
else if ( !IS_PRIV(current->domain) )
return -EPERM;
- else if ( (d = find_domain_by_id(domid)) == NULL )
+ else if ( (d = get_domain_by_id(domid)) == NULL )
return -ESRCH;
rc = (op == XENMEM_current_reservation) ? d->tot_pages : d->max_pages;
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/common/schedule.c
--- a/xen/common/schedule.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/common/schedule.c Fri Jan 26 18:38:40 2007 +0000
@@ -430,7 +430,7 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HAN
break;
ret = -ESRCH;
- d = find_domain_by_id(sched_remote_shutdown.domain_id);
+ d = get_domain_by_id(sched_remote_shutdown.domain_id);
if ( d == NULL )
break;
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/common/xenoprof.c
--- a/xen/common/xenoprof.c Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/common/xenoprof.c Fri Jan 26 18:38:40 2007 +0000
@@ -346,7 +346,7 @@ static int add_active_list(domid_t domid
if ( adomains >= MAX_OPROF_DOMAINS )
return -E2BIG;
- d = find_domain_by_id(domid);
+ d = get_domain_by_id(domid);
if ( d == NULL )
return -EINVAL;
@@ -369,7 +369,7 @@ static int add_passive_list(XEN_GUEST_HA
if ( copy_from_guest(&passive, arg, 1) )
return -EFAULT;
- d = find_domain_by_id(passive.domain_id);
+ d = get_domain_by_id(passive.domain_id);
if ( d == NULL )
return -EINVAL;
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/include/acm/acm_hooks.h
--- a/xen/include/acm/acm_hooks.h Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/include/acm/acm_hooks.h Fri Jan 26 18:38:40 2007 +0000
@@ -241,7 +241,7 @@ static inline int acm_pre_domctl(struct
__func__);
return -EACCES;
}
- d = find_domain_by_id(op->domain);
+ d = get_domain_by_id(op->domain);
if (d != NULL) {
*ssid = d->ssid; /* save for post destroy when d is gone */
if (*ssid == NULL) {
diff -r 32fd32bbf78d -r 271ffb1c12eb xen/include/xen/sched.h
--- a/xen/include/xen/sched.h Fri Jan 26 18:34:36 2007 +0000
+++ b/xen/include/xen/sched.h Fri Jan 26 18:38:40 2007 +0000
@@ -276,7 +276,7 @@ int construct_dom0(
unsigned long initrd_start, unsigned long initrd_len,
char *cmdline);
-struct domain *find_domain_by_id(domid_t dom);
+struct domain *get_domain_by_id(domid_t dom);
void domain_destroy(struct domain *d);
void domain_kill(struct domain *d);
void domain_shutdown(struct domain *d, u8 reason);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|