Commit Graph

63 Commits

Author SHA1 Message Date
jdolecek b63de69b76 fix debug printf - lm_addr is not pointer anumore 2004-08-24 17:41:54 +00:00
jdolecek c341a3a03a make struct linux_oldmmap members explicitly unsigned (with exception
of lm_fd, which can be -1), rename lm_pos to lm_offset, g/c some unneeded casts

no functional change
2004-08-22 15:40:41 +00:00
thorpej 46141a3135 Merge the nathanw_sa branch. 2003-01-18 08:02:46 +00:00
tron ad9b98744f Include "uvm/uvm_param.h" to get definition of PAGE_MASK required for
last change.
2002-12-17 10:42:02 +00:00
christos c0bc51eec5 Don't allow non-page-aligned offsets! So dumb. From Jason Ish, thanks. 2002-12-16 19:37:03 +00:00
christos 018a4082cc - #undef DPRINTF for files that are included from other files.
- more debugging for socketcalls
- fix sa_len if AF_INET; somehow we get passed 28 instead of 16?
2002-03-29 20:49:40 +00:00
christos 65fc8539e4 gc debugging printfs. 2002-03-22 17:14:18 +00:00
christos 57c8cc95f1 s/printf/uprintf/ 2002-02-15 20:02:56 +00:00
christos 28debea38a - add a real linux_sys___sysctl because the mib numbers are different.
implement only the kernel version getting entries.
- make the signal conversion functions consistent; dest is arg 1.
- make linux_fakedev deal with block and char devices differently.
- add linux_sys_ugetrlimit, and flesh out the regular get/setrlimit so
  that they work properly.
- add linux_mmap2 [untested].
- bump kernel to 2.4.18, and make the date be valentine's day :-)
- linux_sys_*stat64 family was totally busted. Fix it.

tested only on i386.

Status:
	gdb, telnet, work
	jdk-1.4.0 extractor works, jdk still coredumps.

christos
2002-02-15 16:47:58 +00:00
lukem dab6ef8b56 add RCSIDs (including regeneration of files as appropriate) 2001-11-13 02:07:52 +00:00
fvdl f90b2fc517 Avoid sign extension problem in offset. 2000-12-29 20:08:54 +00:00
mrg c48063facd remove include of <vm/vm.h> 2000-06-29 02:40:37 +00:00
mrg 89d0a3e519 remove redundant vm includes. 2000-06-26 14:38:50 +00:00
erh 1a89cf484f Move linux_sys_mmap declarations to linux_mmap.h Make sure oldmmap.c includes oldmmap.h. 1998-10-07 23:06:17 +00:00
fvdl 8096c25afc Assign my copyright to TNF. Merge with others were appropriate.
Regen syscall files after script change.
1998-10-04 00:02:23 +00:00
christos 908291d2fe Attempt to fix the mess. 1998-10-03 20:17:36 +00:00
erh d70c9cdbc9 Wheeee!: 8-way split of compat/linux/linux_misc.c into common code and multi-architechture functions. 1998-10-01 04:05:54 +00:00
mycroft fb526e055c Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.
1998-09-11 12:50:05 +00:00
rvb 26b955eec7 ufs_readdir no longer checks if vp->v_type != VDIR so
the individual emulated readdirs must check.
Since netbsd and freebsd return EINVAL for the error
and I don't know what the other platforms do, return
EINVAL for them too.
1998-09-08 20:02:51 +00:00
thorpej ff266f0937 Add some braces to make egcs happy. 1998-08-18 18:23:07 +00:00
thorpej 35bb79bc83 Oops, fix typo, pointed out by Urban Boquist <boquist@cs.chalmers.se>. 1998-07-07 00:40:27 +00:00
thorpej 33f066d24c Implement the shrinking and no-change bits of the Linux mremap(2) system
call, provided by Urban Boquist <boquist@cs.chalmers.se> in PR #5693.

Add a comment about how one might implement the growing bit of mremap(2).
1998-07-02 23:26:58 +00:00
mycroft 487d1fa05e Fix typo in utime(). 1998-03-24 09:47:30 +00:00
fvdl a377495cfb Only free cookiebuf when sure that the vop actually allocated it. 1998-03-03 13:44:48 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
mycroft 26c238db7d Linux's getsid(2) does in fact return a pid, not a pointer. 1998-02-20 18:09:04 +00:00
thorpej 821a4fec46 Add a comment clearly describing that Linux's getsid(2) differs from
the XPG4.2 definition in that it returns the kernel virtual address
of the session structure, rather than the process group ID of the
session leader.
1998-02-14 01:28:15 +00:00
fvdl af221f1c41 msync -> __msync13 1997-10-21 00:57:38 +00:00
fvdl d85f38cbec Fix braino in my interpretation of the eof flag to VOP_READDIR. 1997-10-10 22:16:04 +00:00
mycroft 523d84775a Emulate mremap(2) by returning ENOMEM for now. This should be sufficient for
realloc(3) and other uses.  From Matthias Scheler in PR 3920.
1997-10-10 06:25:34 +00:00
fvdl d6e5e295fa Signal error when getting a 64 bit offset cookie that can't be stored
in 32 bits. Provide an error message to the user, and return EINVAL.
Also, pay attention to the EOF flag from VOP_READDIR. Correct a
misspell in a panic message.
1997-10-10 01:42:21 +00:00
bouyer 1cd83a5971 Fix "missing entries" bug when reading large directories: When reading a
directory and running out of space in the dest buffer, off should point to the
current entry (which was not saved) and not to the next.
I discovered this bug using linux and SunOS emulation over NFS, but seems to
affect other emulations as well.
1997-08-04 09:48:07 +00:00
augustss 9745684ebe Changes to the sudio system:
- It is now possible to handle devices that want "looping" DMA,
    e.g. the SoundBlaster correctly.  The WSS and SB drivers use this.
    To do this several new methods were introduced in audio_hw_if.
  - Different silence handling (forced by previous change).
  - The audio driver can now be mmap()-ed, but due to problems in
    the VM system only for writing for now.
  - The OSS (Linux) audio emulation takes advantage of some of the
    new features.
1997-07-27 01:16:32 +00:00
augustss bc5c0f6530 Add Linux nice() syscall. 1997-04-07 14:13:16 +00:00
mycroft 118b9b478d sys/dir.h -> sys/dirent.h 1996-08-10 09:08:26 +00:00
mycroft 365a977533 Catch up with setre[ug]id() changes. 1996-06-23 11:13:32 +00:00
fvdl 69761c2aa8 Update list of Linux syscalls and implement the ones that are likely to be
used and doable.
1996-05-20 01:59:09 +00:00
christos d7130e8385 - Prototyping changes
- Fix bug that gcc -Wall found in linux_sys_getpgid()
1996-04-04 23:56:01 +00:00
mycroft 46c087980e Add explicit return types. 1996-04-03 08:55:20 +00:00
fvdl 2df1785997 msync, readv and writev were recently added to the Linux kernel; add them
to the emulation as well.
1995-12-18 14:35:08 +00:00
mycroft 9df1f90849 We don't need a private version of fork() here any more. 1995-12-09 04:01:42 +00:00
mycroft 652c9eff74 Use cookies for directory offset, mostly from Greg Hudson. 1995-10-09 11:23:57 +00:00
mycroft 245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
thorpej e1da0d5390 Make system calls conform to a standard prototype and bring those
prototypes into scope.
1995-09-19 22:37:27 +00:00
fvdl 788a8655bc Update offset elsewhere in linux_getdents(); still emulate a bug in
Linux, but avoid endless loops.
1995-09-13 21:51:14 +00:00
fvdl a396a097b7 Fix some bugs & typing problems. 1995-09-07 21:48:59 +00:00
fvdl 28d9d64235 Emulate some syscalls that appear in Linux 1.3: a select() with normal args,
getdents() and flock().
1995-08-23 20:17:28 +00:00
fvdl 7cd62a508c Check for status NULL argument in wait4 and waitpid. From PR #1392
by Thomas EberHardt.
1995-08-21 23:15:51 +00:00
mycroft 9a0cd13442 Implement the old and older uname(2) calls. 1995-08-21 03:42:09 +00:00
mycroft 2c03307168 If updating the timeval would make it negative, zero it instead. 1995-08-16 04:50:17 +00:00