From: kfraser@localhost.localdomain Date: Wed, 16 Aug 2006 15:15:46 +0000 (+0100) Subject: [LINUX] Update the hvm_op wrapper now that the return value of get_param is in X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15710^2~77 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=40daa87afb18348f528560c985c6fdfb73b1cec7;p=xen.git [LINUX] Update the hvm_op wrapper now that the return value of get_param is in the parameter structure rather than the hypercall return value. Signed-off-by: Steven Smith --- diff --git a/linux-2.6-xen-sparse/include/xen/hvm.h b/linux-2.6-xen-sparse/include/xen/hvm.h index 25987ffee5..97bb68a329 100644 --- a/linux-2.6-xen-sparse/include/xen/hvm.h +++ b/linux-2.6-xen-sparse/include/xen/hvm.h @@ -8,10 +8,17 @@ static inline unsigned long hvm_get_parameter(int idx) { struct xen_hvm_param xhv; + int r; xhv.domid = DOMID_SELF; xhv.index = idx; - return HYPERVISOR_hvm_op(HVMOP_get_param, &xhv); + r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv); + if (r < 0) { + printk(KERN_ERR "cannot get hvm parameter %d: %d.\n", + idx, r); + return 0; + } + return xhv.value; } #endif /* XEN_HVM_H__ */