Index: trunk/linux-user/syscall.c =================================================================== --- trunk.orig/linux-user/syscall.c 2008-09-17 20:07:40.000000000 +0300 +++ trunk/linux-user/syscall.c 2008-09-17 21:43:47.000000000 +0300 @@ -276,6 +276,7 @@ extern int setfsuid(int); extern int setfsgid(int); extern int setgroups(int, gid_t *); +extern int uselib(const char*); #define ERRNO_TABLE_SIZE 1200 @@ -4226,7 +4227,13 @@ #endif #ifdef TARGET_NR_uselib case TARGET_NR_uselib: - goto unimplemented; + { + if(!(p = lock_user_string(arg1))) + goto efault; + ret = get_errno(uselib(path(p))); + unlock_user(p, arg1, 0); + } + break; #endif #ifdef TARGET_NR_swapon case TARGET_NR_swapon: @@ -5512,7 +5519,18 @@ goto unimplemented; #ifdef TARGET_NR_mincore case TARGET_NR_mincore: - goto unimplemented; + { + void *a; + if (!(a = lock_user(VERIFY_READ, arg1,arg2, 0))) + goto efault; + if (!(p = lock_user_string(arg3))) + goto mincore_fail; + ret = get_errno(mincore((void*)a, (size_t)arg2, (unsigned char*)p)); + unlock_user(p, arg3, ret); + mincore_fail: + unlock_user(a, arg1, 0); + } + break; #endif #ifdef TARGET_NR_madvise case TARGET_NR_madvise: @@ -5652,7 +5670,8 @@ break; #ifdef TARGET_NR_readahead case TARGET_NR_readahead: - goto unimplemented; + ret = get_errno(readahead((int)arg1, (off64_t)arg2, (size_t)arg3)); + break; #endif #ifdef TARGET_NR_setxattr case TARGET_NR_setxattr: