direct-io.hg

changeset 11149:00a70786e550

[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 <ssmith@xensource.com>
author kfraser@localhost.localdomain
date Wed Aug 16 16:15:46 2006 +0100 (2006-08-16)
parents 4b145f81fce4
children fda70200da01
files linux-2.6-xen-sparse/include/xen/hvm.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/xen/hvm.h	Wed Aug 16 16:14:03 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/include/xen/hvm.h	Wed Aug 16 16:15:46 2006 +0100
     1.3 @@ -8,10 +8,17 @@
     1.4  static inline unsigned long hvm_get_parameter(int idx)
     1.5  {
     1.6  	struct xen_hvm_param xhv;
     1.7 +	int r;
     1.8  
     1.9  	xhv.domid = DOMID_SELF;
    1.10  	xhv.index = idx;
    1.11 -	return HYPERVISOR_hvm_op(HVMOP_get_param, &xhv);
    1.12 +	r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv);
    1.13 +	if (r < 0) {
    1.14 +		printk(KERN_ERR "cannot get hvm parameter %d: %d.\n",
    1.15 +		       idx, r);
    1.16 +		return 0;
    1.17 +	}
    1.18 +	return xhv.value;
    1.19  }
    1.20  
    1.21  #endif /* XEN_HVM_H__ */