1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Use the BSD madvise() syscall implementation for Linux binary emulation,

instead of treating it as an unimplemented syscall. This appears to make
StarOffice 7.0 Linux binaries work according to submitter; also tested
with nvidia driver by submitter.

Submitted by:	Matthias Schuendehuette
This commit is contained in:
Bruce M Simpson 2004-03-28 21:43:27 +00:00
parent cf5011b74a
commit cffd5a3eb4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=127532
5 changed files with 3 additions and 8 deletions

View File

@ -69,7 +69,6 @@ DUMMY(setfsuid);
DUMMY(setfsgid);
DUMMY(pivot_root);
DUMMY(mincore);
DUMMY(madvise);
DUMMY(fadvise64);
#define DUMMY_XATTR(s) \

View File

@ -631,9 +631,6 @@ struct linux_mincore_args {
char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
char vec_l_[PADL_(u_char *)]; u_char * vec; char vec_r_[PADR_(u_char *)];
};
struct linux_madvise_args {
register_t dummy;
};
struct linux_getdents64_args {
char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)];
char dirent_l_[PADL_(void *)]; void * dirent; char dirent_r_[PADR_(void *)];
@ -833,7 +830,6 @@ int linux_setfsuid(struct thread *, struct linux_setfsuid_args *);
int linux_setfsgid(struct thread *, struct linux_setfsgid_args *);
int linux_pivot_root(struct thread *, struct linux_pivot_root_args *);
int linux_mincore(struct thread *, struct linux_mincore_args *);
int linux_madvise(struct thread *, struct linux_madvise_args *);
int linux_getdents64(struct thread *, struct linux_getdents64_args *);
int linux_fcntl64(struct thread *, struct linux_fcntl64_args *);
int linux_setxattr(struct thread *, struct linux_setxattr_args *);

View File

@ -210,7 +210,7 @@
#define LINUX_SYS_linux_setfsgid 216
#define LINUX_SYS_linux_pivot_root 217
#define LINUX_SYS_linux_mincore 218
#define LINUX_SYS_linux_madvise 219
#define LINUX_SYS_madvise 219
#define LINUX_SYS_linux_getdents64 220
#define LINUX_SYS_linux_fcntl64 221
#define LINUX_SYS_linux_setxattr 226

View File

@ -236,7 +236,7 @@ struct sysent linux_sysent[] = {
{ AS(linux_setfsgid_args), (sy_call_t *)linux_setfsgid }, /* 216 = linux_setfsgid */
{ AS(linux_pivot_root_args), (sy_call_t *)linux_pivot_root }, /* 217 = linux_pivot_root */
{ AS(linux_mincore_args), (sy_call_t *)linux_mincore }, /* 218 = linux_mincore */
{ 0, (sy_call_t *)linux_madvise }, /* 219 = linux_madvise */
{ SYF_MPSAFE | AS(madvise_args), (sy_call_t *)madvise }, /* 219 = madvise */
{ AS(linux_getdents64_args), (sy_call_t *)linux_getdents64 }, /* 220 = linux_getdents64 */
{ AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64 }, /* 221 = linux_fcntl64 */
{ 0, (sy_call_t *)nosys }, /* 222 = */

View File

@ -292,7 +292,7 @@
216 STD { int linux_setfsgid(l_gid_t gid); }
217 STD { int linux_pivot_root(char *new_root, char *put_old); }
218 STD { int linux_mincore(l_ulong start, l_size_t len, u_char *vec); }
219 STD { int linux_madvise(void); }
219 MNOPROTO { int madvise(void *addr, size_t len, int behav); }
220 STD { int linux_getdents64(l_uint fd, void *dirent, l_uint count); }
221 STD { int linux_fcntl64(l_uint fd, l_uint cmd, l_ulong arg); }
222 UNIMPL