summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_stats.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix abuse of vtagtype. In addition, after this the linux programs will besobomax2001-09-191-32/+20
| | | | | | | able correctly distinguish ext2fs from the ufs filesystem (previously ext2fs was indistinguishable from the ufs). Reviewed by: phk, marcel
* KSE Milestone 2julian2001-09-121-31/+31
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Round of cleanups and enhancements. These include (in random order):marcel2001-09-081-133/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Introduce private types for use in linux syscalls for two reasons: 1. establish type independence for ease in porting and, 2. provide a visual queue as to which syscalls have proper prototypes to further cleanup the i386/alpha split. Linuxulator types are prefixed by 'l_'. void and char have not been "virtualized". o Provide dummy functions for all syscalls and remove dummy functions or implementations of truely obsolete syscalls. o Sanitize the shm*, sem* and msg* syscalls. o Make a first attempt to implement the linux_sysctl syscall. At this time it only returns one MIB (KERN_VERSION), but most importantly, it tells us when we need to add additional sysctls :-) o Bump the kenel version up to 2.4.2 (this is not the same as the KERN_VERSION MIB, BTW). o Implement new syscalls, of which most are specific to i386. Our syscall table is now up to date with Linux 2.4.2. Some highlights: - Implement the 32-bit uid_t and gid_t bases syscalls. - Implement a couple of 64-bit file size/offset bases syscalls. o Fix or improve numerous syscalls and prototypes. o Reduce style(9) violations while I'm here. Especially indentation inconsistencies within the same file are addressed. Re-indenting did not obfuscate actual changes to the extend that it could not be combined. NOTE: I spend some time testing these changes and found that if there were regressions, they were not caused by these changes AFAICT. It was observed that installing a RH 7.1 runtime environment did make matters worse. Hangs and/or reboots have been observed with and without these changes, so when it failed to make life better in cases it doesn't look like it made it worse.
* S_IFCHR is not a bit mask, it's just a value in a field. The correctpaul2001-06-041-1/+1
| | | | | | way to clear that field is to use S_IFMT. Pointed out by BDE.
* Remove vestiges of MFS.ru2001-06-011-1/+1
|
* Remove MFSphk2001-05-291-2/+0
|
* - sys/n[tw]fs moved to sys/fs/n[tw]fsru2001-05-261-1/+1
| | | | - /usr/include/n[tw]fs moved to /usr/include/fs/n[tw]fs
* A bogus check for a char device also matched symbolic links.paul2001-04-251-1/+1
| | | | | | Replace it with a correct check using S_ISCHR() Symbolic links will now work again in linux compatibility.
* Allow debugging output to be controlled on a per-syscall granularity.jlemon2001-02-161-8/+12
| | | | | | Also clean up debugging output in a slightly more uniform fashion. The default behavior remains the same (all debugging output is turned on)
* Instead of hard coding the major numbers for IDE and SCSI disksjoe2001-01-141-10/+17
| | | | look in the device's cdevsw for the D_DISK flag.
* Map FreeBSD character device hard disks to Linux block device hard disks.paul2000-12-291-0/+14
| | | | This fixes the problem with VMWARE not being able to use raw disks.
* Don't auto-generate the syscalls.marcel2000-12-031-4/+0
|
* Revert auto-generation. The Alpha port is broken.marcel2000-11-101-0/+4
| | | | Syncing with it is wrong.
* Sync with Alpha:marcel2000-11-091-4/+0
| | | | | Do not use sysent.c, proto.h and syscall.h in source tree; use auto-generated versions.
* Fix linux_ustat syscall. We only have cdevs now, so lookingmarcel2000-11-021-2/+2
| | | | | | | | for a block device isn't that useful anymore. Reported by: Wesley Morgan <morganw@chemicals.tacorp.com> Submitted by: gallatin Acknowledged by: phk
* The MI/MD split wasn't perfect and the MI files need hacks for theobrien2000-11-011-9/+32
| | | | | | AlphaLinux compat bits. This will be better cleaned up soon. Agreed to what ever was necessary by: marcel
* Update include directives.marcel2000-08-221-4/+3
|
* Remove unneeded #include <vm/vm_zone.h>phk2000-04-301-1/+0
| | | | Generated by: src/tools/tools/kerninclude
* Convert the filesystem type returned in struct statfs by syscallsmarcel2000-01-081-2/+51
| | | | | | | | linux_statfs and linux_fstatfs. Linux binaries testing this expect the filesystem's magic number and not our vnode's tag. PR: 15425 Tested by: Vladimir N. Silyaev <vsilyaev@mindspring.com>
* Introduce NDFREE (and remove VOP_ABORTOP)eivind1999-12-151-0/+5
|
* Remove unused includes.marcel1999-12-101-2/+0
| | | | Found by: phk-scan
* Implement linux_ustat.marcel1999-11-271-3/+56
| | | | Reviewed by: bde
* Use fo_stat() rather than Yet Another duplication of kern_descrip.c's statpeter1999-11-081-15/+1
| | | | code.
* Fix a braino: Linux minor device numbers are 8 bits wide and not 10.marcel1999-08-291-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix linux_newlstat in that it doesn't return the attributes of its containingmarcel1999-08-251-117/+104
| | | | | | | | directory. Also, update arguments of NDINIT for both newstat and newlstat. While I'm at it, fix style bugs in all {s|ls|fs}tat syscalls. Reported by: bde
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledphk1999-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udev_t in the kernel but still called dev_t in userland. Provide functions to manipulate both types: major() umajor() minor() uminor() makedev() umakedev() dev2udev() udev2dev() For now they're functions, they will become in-line functions after one of the next two steps in this process. Return major/minor/makedev to macro-hood for userland. Register a name in cdevsw[] for the "filedescriptor" driver. In the kernel the udev_t appears in places where we have the major/minor number combination, (ie: a potential device: we may not have the driver nor the device), like in inodes, vattr, cdevsw registration and so on, whereas the dev_t appears where we carry around a reference to a actual device. In the future the cdevsw and the aliased-from vnode will be hung directly from the dev_t, along with up to two softc pointers for the device driver and a few houskeeping bits. This will essentially replace the current "alias" check code (same buck, bigger bang). A little stunt has been provided to try to catch places where the wrong type is being used (dev_t vs udev_t), if you see something not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if it makes a difference. If it does, please try to track it down (many hands make light work) or at least try to reproduce it as simply as possible, and describe how to do that. Without DEVT_FASCIST I belive this patch is a no-op. Stylistic/posixoid comments about the userland view of the <sys/*.h> files welcome now, from userland they now contain the end result. Next planned step: make all dev_t's refer to the same devsw[] which means convert BLK's to CHR's at the perimeter of the vnodes and other places where they enter the game (bootdev, mknod, sysctl).
* Yet another place which knew too much. Still not sure how muchphk1999-05-091-2/+2
| | | | good this does in the end.
* Fix up a few easy 'assignment used as truth value' and 'suggest parenspeter1999-05-061-5/+9
| | | | | around && within ||' type warnings. I'm pretty sure I have not masked any problems here, I've committed real problem fixes seperately.
* Move the "retval" (3rd) parameter from all syscall functions and putphk1997-11-061-7/+6
| | | | | | | | | | | | it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fixed lseek() on named pipes. It always succeeded but should always fail.bde1996-12-191-1/+2
| | | | | | | | | | Broke locking on named pipes in the same way as locking on non-vnodes (wrong errno). This will be fixed later. The fix involves negative logic. Named pipes are now distinguished from other types of files with vnodes, and there is additional code to handle vnodes and named pipes in the same way only where that makes sense (not for lseek, locking or TIOCSCTTY).
* Mega-commit for Linux emulator update.. This has been stress tested underpeter1996-03-021-67/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netscape-2.0 for Linux running all the Java stuff. The scrollbars are now working, at least on my machine. (whew! :-) I'm uncomfortable with the size of this commit, but it's too inter-dependant to easily seperate out. The main changes: COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386 machine dependent section into the linux emulator itself. The int 0x80 syscall code was almost identical to the lcall 7,0 code and a minor tweak allows them to both be used with the same C code. All kernels can now just modload the lkm and it'll DTRT without having to rebuild the kernel first. Like IBCS2, you can statically compile it in with "options LINUX". A pile of new syscalls implemented, including getdents(), llseek(), readv(), writev(), msync(), personality(). The Linux-ELF libraries want to use some of these. linux_select() now obeys Linux semantics, ie: returns the time remaining of the timeout value rather than leaving it the original value. Quite a few bugs removed, including incorrect arguments being used in syscalls.. eg: mixups between passing the sigset as an int, vs passing it as a pointer and doing a copyin(), missing return values, unhandled cases, SIOC* ioctls, etc. The build for the code has changed. i386/conf/files now knows how to build linux_genassym and generate linux_assym.h on the fly. Supporting changes elsewhere in the kernel: The user-mode signal trampoline has moved from the U area to immediately below the top of the stack (below PS_STRINGS). This allows the different binary emulations to have their own signal trampoline code (which gets rid of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so that the emulator can provide the exact "struct sigcontext *" argument to the program's signal handlers. The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which have the same values as the re-used SA_DISABLE and SA_ONSTACK which are intended for sigaction only. This enables the support of a SA_RESETHAND flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal semantics where the signal handler is reset when it's triggered. makesyscalls.sh no longer appends the struct sysentvec on the end of the generated init_sysent.c code. It's a lot saner to have it in a seperate file rather than trying to update the structure inside the awk script. :-) At exec time, the dozen bytes or so of signal trampoline code are copied to the top of the user's stack, rather than obtaining the trampoline code the old way by getting a clone of the parent's user area. This allows Linux and native binaries to freely exec each other without getting trampolines mixed up.
* Call pipe_stat() when presented with a DTYPE_PIPE file in the linuxpeter1996-01-301-1/+5
| | | | | | | fstat() syscall, rather than panic("linux newfstat"). (Note: I've extracted this from a larger set of diffs, I'm confident I've not missed any dependencies but can't modload it to test it on my system)
* Completed function declarations and added prototypes.bde1995-11-221-5/+3
| | | | | | Removed some unnecessary #includes. Fixed warnings about nested externs.
* Reviewed by: julian with quick glances by bruce and othersjulian1995-08-281-7/+2
| | | | | | | | | | | | | | | | | | | | | | Submitted by: terry (terry lambert) This is a composite of 3 patch sets submitted by terry. they are: New low-level init code that supports loadbal modules better some cleanups in the namei code to help terry in 16-bit character support some changes to the mount-root code to make it a little more modular.. NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able to test those cases.. certainly mounting root of disk still works just fine.. mfs should work but is untested. (tomorrows task) The low level init stuff includes a total rewrite of init_main.c to make it possible for new modules to have an init phase by simply adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can be added to the kernel without editing any other files other than the 'files' file.
* First incarnation of our Linux emulator or rather compatibility code.sos1995-06-251-0/+273
This first shot only incorporaties so much functionality that DOOM can run (the X version), signal handling is VERY weak, so is many other things. But it meets my milestone number one (you guessed it - running DOOM). Uses /compat/linux as prefix for loading shared libs, so it won't conflict with our own libs. Kernel must be compiled with "options COMPAT_LINUX" for this to work.
OpenPOWER on IntegriCloud