summaryrefslogtreecommitdiffstats
path: root/usr.bin/fstat
Commit message (Collapse)AuthorAgeFilesLines
* Build usr.bin/ with WARNS=6 by default.ed2010-01-021-1/+0
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* fstat: fix fsid comparison when executed on systems with 64-bit longavg2009-08-202-2/+2
| | | | | | | | | | | | | | | | | | | | | This affects only fstat on zfs and devfs, only on 64-bit systems and only when fsid is greater than 2^31 - 1. When fstat examines a file via stat(2) it takes uint32_t st_dev and assigns to (signed) (64-bit) long fsid, this results in a positive value. When fstat examines opened files it takes int32_t f_fsid.val[0] and assigns to (signed) (64-bit) long fsid, this results in a negative value. So, while initially st_dev and f_fsid.val[0] have the same bit values they get promoted to different 64-bit values because of the signed-vs-unsigned difference. A fix is to use "more natural" positive numbers by introducing intermediate unsigned cast for f_fsid.val[0]. Reviewed by: jhb, lulf Approved by: re (kib) MFC after: 1 week (to stable/7)
* Add manual page links to advertise procstat(1) a little better.trasz2009-07-091-1/+2
| | | | Approved by: re (kib)
* Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementationdfr2009-06-241-1/+0
| | | | and will be removed.
* Fix bug in zphys offset calculation I introduced while retypingbland2009-06-091-1/+1
| | | | original patch.
* Chase ZFS v13 import changes.bland2009-06-091-1/+2
| | | | | | | This is a temporary fix until we find a way to avoid fstat to be broken each time we change the znode. Approved by: lulf
* Fix compilation of fstat.ed2009-02-281-1/+1
| | | | The udev should now be obtained from the dosmount instead of the denode.
* Include param.h instead of types.h before mount.h so that the nestedrwatson2008-12-291-1/+1
| | | | | | include of param.h can be removed from audit.h. MFC after: 3 weeks
* Merge latest DTrace changes from Perforce.rodrigc2008-11-051-0/+1
| | | | Approved by: jb
* Integrate the new MPSAFE TTY layer to the FreeBSD operating system.ed2008-08-201-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last half year I've been working on a replacement TTY layer for the FreeBSD kernel. The new TTY layer was designed to improve the following: - Improved driver model: The old TTY layer has a driver model that is not abstract enough to make it friendly to use. A good example is the output path, where the device drivers directly access the output buffers. This means that an in-kernel PPP implementation must always convert network buffers into TTY buffers. If a PPP implementation would be built on top of the new TTY layer (still needs a hooks layer, though), it would allow the PPP implementation to directly hand the data to the TTY driver. - Improved hotplugging: With the old TTY layer, it isn't entirely safe to destroy TTY's from the system. This implementation has a two-step destructing design, where the driver first abandons the TTY. After all threads have left the TTY, the TTY layer calls a routine in the driver, which can be used to free resources (unit numbers, etc). The pts(4) driver also implements this feature, which means posix_openpt() will now return PTY's that are created on the fly. - Improved performance: One of the major improvements is the per-TTY mutex, which is expected to improve scalability when compared to the old Giant locking. Another change is the unbuffered copying to userspace, which is both used on TTY device nodes and PTY masters. Upgrading should be quite straightforward. Unlike previous versions, existing kernel configuration files do not need to be changed, except when they reference device drivers that are listed in UPDATING. Obtained from: //depot/projects/mpsafetty/... Approved by: philip (ex-mentor) Discussed: on the lists, at BSDCan, at the DevSummit Sponsored by: Snow B.V., the Netherlands dcons(4) fixed by: kan
* Struct cdev is always the member of the struct cdev_priv. When devfskib2008-06-161-3/+2
| | | | | | | | | | | needed to promote cdev to cdev_priv, the si_priv pointer was followed. Use member2struct() to calculate address of the wrapping cdev_priv. Rename si_priv to __si_reserved. Tested by: pho Reviewed by: ed MFC after: 2 weeks
* Fix build of fstat after minor() changes.ed2008-06-121-1/+1
| | | | | | | | | | Even though I ran a `make universe' to see whether the changes to the device minor number macro's broke the build, I was not expecting `make universe' to silently continue if build errors occured, thus causing me to overlook the build error. Approved by: philip (mentor) Pointyhat to: me
* Use _WANT_FILE to make struct file visible from userland. This ispjd2008-05-261-1/+2
| | | | | | similar to _WANT_UCRED and _WANT_PRISON and seems to be much nicer than defining _KERNEL. It is also needed for my sys/refcount.h change going in soon.
* Use a sledgehammer cast (that was in the original patch to boot) tojhb2008-05-071-1/+1
| | | | | quiet a warning on 64-bit platforms now that 'size' is an int and not a size_t.
* Fix reading the address of a znode_phys from a znode on 64-bit platformsjhb2008-05-071-3/+3
| | | | | | | | where sizeof(pointer) != sizeof(int). MFC after: 1 week PR: amd64/123456 Submitted by: KOIE Hidetaka | hide koie.org
* The debug.sizeof.znode sysctl returns an int, not a size_t. This can causejhb2008-05-071-2/+3
| | | | | | | | a hang on 64-bit platforms. MFC after: 1 week PR: amd64/123456 Submitted by: KOIE Hidetaka | hide koie.org
* Only output details about the current working directory of a process ifjhb2008-05-071-1/+2
| | | | | | | | | the vnode pointer is not NULL. This avoids spurious warnings in fstat -v output for kernel processes. MFC after: 1 week PR: amd64/123456 Submitted by: KOIE Hidetaka | hide koie.org
* Fix some section references.pjd2008-04-291-1/+1
|
* Don't depend on the modification time of the "zfs" subdir.ru2008-04-291-2/+1
|
* - Fix makefile so it doesn't break the build in some corner cases. [1]ru2008-04-292-134/+3
| | | | | | - Remove an extra copy of zfs.c. Reported by: yar [1]
* The sources covered by Sun's CDDL have been repo copied below thejb2008-03-271-8/+8
| | | | | | | | src/cddl and src/sys/cddl directories per the core@ decision following the license review. This change modifies the affected Makefiles to reference the sources in their new location.
* Flag a hack.ru2008-01-241-1/+2
|
* Style.ru2008-01-241-2/+2
|
* Remove _SOLARIS_C_SOURCE now that it doesn't do anything in FreeBSDjb2007-11-281-1/+0
| | | | | | headers. All OpenSolaris compatibility comes via the set of specific compatibility headers in src/compat/opensolaris and src/sys/compat/opensolaris.
* Use variable types which match the function prototypes.jb2007-11-172-2/+4
|
* - Add ZFS-support to fstat(1). This allows ZFS-filsystems to be including inlulf2007-11-056-0/+321
| | | | | | | | | | | the open file-listing. It is added as a separate source file, so it can respect WITH_/WITHOUT_CDDL as compile-flags. - The warnlevel of the Makefile was decreased to quell solaris #pragma warnings. - Expect that fstat(1) doesn't work with kernel compiled with DEBUG_VFS_LOCKS/DEBUG_LOCKS for now. Approved by: pjd (mentor)
* KERN_PROC_ALL produces a kinfo_proc for each thread in a process, whichemaste2007-03-091-1/+1
| | | | | | | caused fstat to produce duplicated output for threaded processes. Instead use KERN_PROC_PROC to get just one kinfo_proc per process. MFC After: 2 weeks
* Add marker vnodes to ensure that all vnodes associated with the mount point aretegge2006-01-091-0/+1
| | | | | | iterated over when using MNT_VNODE_FOREACH. Reviewed by: truckman
* Un-break processing of device major/minor values with fstat -n. We docsjp2005-11-051-3/+5
| | | | | | | | | | | this by accessing the cdev_priv element of the cdev structure. Looking forward we need a better way to handle this, as this structure shouldn't be frobbed by userspace. Submitted by: Doug Steinwand PR: bin/88203 MFC after: 1 week Discussed with: phk
* Introduce kdevtoname, which when given the kernel address of acsjp2005-07-301-4/+16
| | | | | | | | | cdev structure, returns the device name associated with it through the __si_namebuf member. This un-breaks the processing of devices. This is a RELENG_6 candidate. Reviewed by: phk
* Sync program's usage() with manpage's SYNOPSIS.ru2005-05-211-1/+1
|
* Dike out another kvm indiscretion.phk2005-03-161-0/+2
|
* Dike out unwarranted si_udev fondling.phk2005-03-151-1/+2
|
* Expand *n't contractions.ru2005-02-131-3/+3
|
* Add text about jail root directory as well.phk2005-01-301-5/+6
| | | | Submitted by: "Mark W. Krentel" <krentel@dreamscape.com>
* Report jail directory if set.phk2005-01-291-0/+15
| | | | | | | Sanity-check fd_lastfile. PR: 62699 Patch by: "Mark W. Krentel" <krentel@dreamscape.com>
* Sort sections.ru2005-01-181-5/+5
|
* Get the vnode from file.f_vnode instead of file.f_data.ssouhlal2005-01-111-2/+2
| | | | | | | | | | | Nowadays, f_data points to the vnode only if the underlying filesystem doesn't use it for other purposes (devfs uses it to store the cdev, for example). Found by: csjp Reviewed by: csjp Approved by: phk, wes, grehan (mentor) MFC after: 1 week
* filedesc0 is an internal detail of the kernel, don't look at it.phk2004-11-071-13/+9
|
* Add -D_KVM_VNODE to indicate that despite being a userland program,phk2004-10-211-0/+2
| | | | we want to know the vnode structures internals.
* Introduce options list the standard way.charnier2004-07-261-2/+2
|
* Slide pipe.h include after the _KERNEL define in preparation for disallowingsilby2004-07-211-1/+1
| | | | non-_KERNEL inclusions of pipe.h
* Deal with double whitespace.ru2004-07-031-1/+1
|
* Mechanically kill hard sentence breaks.ru2004-07-021-7/+14
|
* 1) ANSIfy.dwmalone2004-06-295-45/+21
| | | | | | | 2) Use %p to print a pointer. 3) Use longs for fileids and ino to avoid comparing signed and unsigned. 4) Make the KVM_READ macro a little more cranky. 5) Set WARNS while I'm here.
* Second half of the dev_t cleanup.phk2004-06-172-7/+7
| | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc.
* Teach fstat(1) about new location for socket state flags relating torwatson2004-06-141-2/+2
| | | | | | | socket buffer state. Submitted by: rik Reminded by: le
* Correct the description of the -N option.ru2004-03-261-2/+2
|
* Do not cache and correctly free() dosmount entry in case of errors.fjoe2003-09-231-3/+4
| | | | PR: 53980 (partially)
* fix this code properly. msdosfs can't have device nodes on them.jmg2003-06-243-3/+7
| | | | | | | comment how to read device nodes from ufs (if an adventurous soul wants to fix it!). Reviewed by: bde
OpenPOWER on IntegriCloud