xtraeme
af97f2e875
Remove __P()
2005-08-30 20:08:01 +00:00
christos
c107ef9edc
- sprinkle const
...
- avoid shadowed variables.
2005-05-29 21:55:33 +00:00
christos
8f3566ce61
PR/29782: Martin Husemann: procfs can not unmount when some process has its
...
current directory in curproc. Fix from Pedro Martelletto:
We cannot call vgone() from procfs_inactive() if we are coming from
vclean(). that's what's probably causing the deadlock.
2005-04-02 06:15:09 +00:00
perry
477853c351
nuke trailing whitespace
2005-02-26 22:58:54 +00:00
yamt
364ea008bb
procfs_readdir:
...
- return correct cookie when buffer size is small.
- simplify logic.
2004-10-04 08:40:18 +00:00
yamt
ef763f0a42
procfs_readdir: remove a redundant assignment.
2004-10-04 08:37:06 +00:00
yamt
d79c3679ea
procfs_getattr: correct size of /proc/self.
2004-10-02 04:28:57 +00:00
yamt
269a1761b2
procfs_readdir:
...
- fix a locking problem, using proclist_foreach_call. PR/27098.
- correct snprintf size argument.
2004-10-01 16:32:16 +00:00
yamt
3cca1d9e20
procfs_readdir: fix an offset handling bug after addition of /proc/self.
2004-10-01 14:09:55 +00:00
yamt
f8f70a5eb4
procfs_readdir: use a list macro.
2004-10-01 14:09:14 +00:00
jdolecek
845beacce3
add 'mounts' file for -o linux, which lists all currently mounted
...
filesystems; Linux glibc statvfs() uses this to get some of mount flags,
and this file is also useful as /emul/linux/etc/mtab (via symlink)
2004-09-20 17:53:08 +00:00
jrf
bafcaa70cd
Removed remaining caddr_t casts we do not need in miscfs. Recompiled
...
kernel and ran for a day or so. There are still some caddr_t types in
the arguments of some calls, I will do those separately (later) as
they touch a lot more of the system.
Approved by christos@NetBSD.org .
2004-04-29 16:10:54 +00:00
itojun
8bcb745d7c
sprintf -> snprintf
2004-04-22 00:31:00 +00:00
jdolecek
cb3ab0a872
unlock the descriptor table simple lock after fd_getfile() call in
...
procfs_readdir()
fixes procfs locking problems reported on current-users@, problem place
found by enami tsugutomo
2004-02-15 22:18:17 +00:00
simonb
b6abb6ab1d
Remove some assigned-to but otherwise unused variables.
2003-10-30 01:58:17 +00:00
darcy
566d30be44
Changes as discussed with itojun on tech-kern. I have modified the enums
...
to have KFS or PFS differentiators. Further I have wrapped the enum in
procfs in "#ifdef _KERNEL" as it is done in kernfs.
To see the discussion go to http://mail-index.NetBSD.org/tech-kern/2003/09/
and look for "Mismatched enums in include files" in the list.
2003-09-27 13:29:02 +00:00
itojun
dca8daa76d
remove meaningless line (variable overwritten 2 lines below)
2003-09-07 00:25:04 +00:00
agc
aad01611e7
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
fvdl
d5aece61d6
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
...
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
thorpej
a06b275edc
Undo part of the ktrace/lwp changes. In particular:
...
* Remove the "lwp *" argument that was added to vget(). Turns out
that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
just to appease the above.
2003-06-29 18:43:21 +00:00
darrenr
960df3c8d1
Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
...
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.
Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
christos
210944c7de
Add /proc/<pid>/stat for linux compat. j2sdk1.4.2 depends on it.
2003-05-28 18:03:15 +00:00
christos
11cc5eb2c6
Make symlinks for directories that point to the actual directory.
...
Make symlinks to [kqueue] and [misc] for kqueue and misc fds.
2003-04-18 21:55:35 +00:00
jdolecek
f331bb3205
do not show nodes corresponding to directory descriptors for process
...
in fd/ subdirectory, nor allow lookup/open for the nodes
this fixes PR kern/21187 for good, and also avoids interesting directory
locking issues
2003-04-17 20:50:46 +00:00
jdolecek
884bdfdbaf
procfs_readdir(): in Pfd case, only show descriptors of types we want
...
how to represent (vnodes, fifo, pipes); also use fd_getfile() et al
this avoids annoying EOPNOTSUPP error messages from ls -F and such
2003-04-17 20:33:17 +00:00
jdolecek
be4c900d41
procfs_lookup(): use fd_getfile() et al in Pfd case
2003-04-17 20:19:18 +00:00
jdolecek
ed9a5a7448
use fd_getfile() in procfs_getfp(), and FILE_USE()/FILE_UNUSE() the
...
returned file descriptor pointer appropriately
2003-04-17 19:04:25 +00:00
jdolecek
64b598bf33
make some local arrays/variables static + const
2003-04-17 18:08:28 +00:00
jdolecek
98f212db7d
use former genfs_eopnotsupp_rele() as genfs_eopnotsupp(), so that vnodes
...
are vput()/vrele()d as necessary - some filesystems did use the wrong
one for some ops, and it's just safer to not take the chance
based on suggestion by Bill Studenmund
2003-04-10 21:53:32 +00:00
dsl
b2aefec351
Remove pointless check against PID_MAX. Let pfind() do the validation.
...
(The new pid allocation code may decide to allocate pids above PID_MAX.)
2003-04-05 23:32:52 +00:00
jrf
a2d850baf8
This addresses PR kerm/19989. Thanks to hamajima@nagoya.ydc.co.jp for submitting this patch which enables /proc/uptime for linux emul. Patch reviewed by atatat@netbsd.org and tron@netbsd.org, approved by tron@netbsd.org.
2003-02-25 21:00:31 +00:00
martin
d30bd703a5
Cast off_t expression to long long to match format even on 64 bit
...
plattforms.
Shouldn't we introduce a PRIoff_t macro to create such format strings?
2003-01-04 15:42:35 +00:00
christos
b5e0c9eb5b
add LK_CANRECURSE in the locking of /dev/<pid>/fd/<n> and remove the curproc
...
kludge. Thanks to fvdl.
2003-01-03 13:54:22 +00:00
christos
dbe6c38bc2
Implement /proc/<pid>/fd/<n>. This is work in progress. Questionable things:
...
- Is it ok to convert DTYPE_PIPE to VFIFO and DTYPE_SOCKET to VSOCK?
- XXX: Avoid locking issue in ls -Rl /proc by avoiding curproc
- Does I/O to pipes work?
- XXX: Are there security implications?
2003-01-03 13:21:17 +00:00
simonb
c475865f39
Just use the "time" variable in the *_getattr functions instead of a call
...
to (the potentially expensive) microtime().
2002-08-03 04:52:44 +00:00
thorpej
f1f51aa2b8
Move code shared by procfs and the kernel proper out of procfs and
...
into the kernel proper (renaming functions from procfs_* to process_*).
2002-05-09 15:44:44 +00:00
christos
5ff60a19d9
Don't hide the real return code with EPERM.
2002-01-12 18:51:56 +00:00
chs
5a690c92a1
add a VOP_PUTPAGES method for all the filesystems that don't have pages,
...
just unlock the interlock.
2001-12-06 04:27:40 +00:00
thorpej
03efee5585
* Allow machine-dependent code to specify hooks for ptrace(2)
...
(__HAVE_PTRACE_MACHDEP) and procfs (__HAVE_PROCFS_MACHDEP).
These changes will allow platforms like x86 (XMM) and PowerPC
(AltiVec) to export extended register sets in a sane manner.
* Use __HAVE_PTRACE_MACHDEP to export x86 XMM registers (standard
FP + SSE/SSE2) using PT_{GET,SET}XMMREGS (in the machdep
ptrace request space).
* Use __HAVE_PROCFS_MACHDEP to export x86 XMM registers via
/proc/N/xmmregs in procfs.
2001-12-05 00:58:05 +00:00
lukem
e4b00f433c
add RCSIDs
2001-11-10 13:33:40 +00:00
simonb
cf63a6b052
Remove some variables that are set but never used.
2001-11-06 07:20:37 +00:00
chs
94d6f3ee95
map files are zero-length.
2001-08-31 04:56:26 +00:00
chs
6e2828061f
procfs_bmap() should never be called, make it a "bad op".
...
let procfs_mmap() use the default error method.
2001-06-03 02:21:35 +00:00
kleink
79283614b3
In procfs_readdir(), give /proc/# directories DT_DIR (rather than DT_REG).
2001-04-14 13:25:46 +00:00
fvdl
49b162566a
Bump va_blocksize for the map files some more, so that programs with
...
quite a few mappings have a chance of being handled correctly if
st_blksize is looked at.
2001-03-30 20:25:11 +00:00
fvdl
2e64bebd3b
For -o linux mounts, add some code to emulate /proc/#/maps.
...
Needs NAMECACHE_ENTER_REVERSE to include filenames.
2001-03-29 22:41:52 +00:00
jdolecek
522f569810
make some more constant arrays 'const'
2001-02-21 21:39:52 +00:00
jdolecek
d9466585b7
make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const
2001-01-22 12:17:35 +00:00
fvdl
4e000b75b2
Add a few linux-style files, only enabled when -o linux is specified
...
for the mount. Currently these are /proc/cpuinfo and /proc/meminfo.
The former only does something on i386 right now.
2001-01-17 00:09:07 +00:00
chs
b0ec16cc38
remove dead code and other misc cleanup.
2000-11-24 18:58:37 +00:00