ia64/xen-unstable
changeset 15738:918e04a982b8
acm: Cleaner use of copy_from_guest().
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author | kfraser@localhost.localdomain |
---|---|
date | Thu Aug 09 10:03:59 2007 +0100 (2007-08-09) |
parents | ae3b1331ce19 |
children | b55fe44438bc |
files | xen/acm/acm_policy.c |
line diff
1.1 --- a/xen/acm/acm_policy.c Thu Aug 09 10:01:17 2007 +0100 1.2 +++ b/xen/acm/acm_policy.c Thu Aug 09 10:03:59 2007 +0100 1.3 @@ -710,12 +710,12 @@ acm_change_policy(struct acm_change_poli 1.4 goto acm_chg_policy_exit; 1.5 } 1.6 1.7 - if ( copy_from_guest((u8 *)dels.array, 1.8 + if ( copy_from_guest(dels.array, 1.9 chgpolicy->del_array, 1.10 - chgpolicy->delarray_size) || 1.11 - copy_from_guest((u8 *)ssidmap.array, 1.12 + dels.num_items) || 1.13 + copy_from_guest(ssidmap.array, 1.14 chgpolicy->chg_array, 1.15 - chgpolicy->chgarray_size) || 1.16 + ssidmap.num_items) || 1.17 copy_from_guest(binpolicy, 1.18 chgpolicy->policy_pushcache, 1.19 chgpolicy->policy_pushcache_size )) 1.20 @@ -844,9 +844,9 @@ acm_relabel_domains(struct acm_relabel_d 1.21 memset(errors.array, 0x0, sizeof(uint32_t) * errors.num_items); 1.22 } 1.23 1.24 - if ( copy_from_guest((u8 *)relabels.array, 1.25 + if ( copy_from_guest(relabels.array, 1.26 relabel->relabel_map, 1.27 - relabel->relabel_map_size) ) 1.28 + relabels.num_items) ) 1.29 { 1.30 rc = -EFAULT; 1.31 goto acm_relabel_doms_exit;