mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
Linux user memory access API change (initial patch by Thayne Harbaugh)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3583 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
44f8625d23
commit
579a97f7ff
14 changed files with 973 additions and 624 deletions
|
@ -13,14 +13,17 @@
|
|||
#define NGROUPS 32
|
||||
|
||||
/* ??? This should really be somewhere else. */
|
||||
void memcpy_to_target(abi_ulong dest, const void *src,
|
||||
unsigned long len)
|
||||
abi_long memcpy_to_target(abi_ulong dest, const void *src,
|
||||
unsigned long len)
|
||||
{
|
||||
void *host_ptr;
|
||||
|
||||
host_ptr = lock_user(dest, len, 0);
|
||||
host_ptr = lock_user(VERIFY_WRITE, dest, len, 0);
|
||||
if (!host_ptr)
|
||||
return -TARGET_EFAULT;
|
||||
memcpy(host_ptr, src, len);
|
||||
unlock_user(host_ptr, dest, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int in_group_p(gid_t g)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue