[HVM] HVMOP_get_param return parameter value within the provided parameter struct,

not as a direct return value.
Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-08-13 09:44:07 +01:00
1 parent 3321c3c8e9
commit c730da041b
1 file changed
+6 -4
+6 -4
View File
@@ -568,7 +568,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(void) arg)
else if ( IS_PRIV(current->domain) )
{
d = find_domain_by_id(a.domid);
if ( !d )
if ( d == NULL )
return -ESRCH;
}
else
@@ -578,22 +578,24 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(void) arg)
if ( op == HVMOP_set_param )
{
rc = 0;
d->arch.hvm_domain.params[a.index] = a.value;
rc = 0;
}
else
{
rc = d->arch.hvm_domain.params[a.index];
a.value = d->arch.hvm_domain.params[a.index];
rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
}
put_domain(d);
return rc;
break;
}
default:
{
DPRINTK("Bad HVM op %ld.\n", op);
rc = -ENOSYS;
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.