summaryrefslogtreecommitdiffstats
path: root/usr.bin/fstat
Commit message (Collapse)AuthorAgeFilesLines
* use .Mt to mark up email addresses consistently (part3)bapt2014-06-231-1/+1
| | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de>
* Similar to 233760 and 236717, export some more useful info about thejhb2013-05-032-0/+31
| | | | | | | | | | | | | | | kernel-based POSIX semaphore descriptors to userland via procstat(1) and fstat(1): - Change sem file descriptors to track the pathname they are associated with and add a ksem_info() method to copy the path out to a caller-supplied buffer. - Use the fo_stat() method of shared memory objects and ksem_info() to export the path, mode, and value of a semaphore via struct kinfo_file. - Add a struct semstat to the libprocstat(3) interface along with a procstat_get_sem_info() to export the mode and value of a semaphore. - Teach fstat about semaphores and to display their path, mode, and value. MFC after: 2 weeks
* fuser(1) requires a filename.eadler2013-04-111-1/+1
| | | | | | Reviewed by: lstewart Approved by: bcr (mentor) MFC after: 3 days
* Bring DPADD in sync with LDADD.marcel2012-05-191-1/+1
|
* Don't cast inode number or file size down to long or unsigned.gleb2012-05-181-1/+1
| | | | | | | Since ino_t size is about to change to 64-bits, casts to long would truncate 64-bit numbers on 32-bit archs. Sponsored by: Google Summer of Code 2011
* Export some more useful info about shared memory objects to userlandjhb2012-04-011-0/+29
| | | | | | | | | | | | | | | | | | | via procstat(1) and fstat(1): - Change shm file descriptors to track the pathname they are associated with and add a shm_path() method to copy the path out to a caller-supplied buffer. - Use the fo_stat() method of shared memory objects and shm_path() to export the path, mode, and size of a shared memory object via struct kinfo_file. - Add a struct shmstat to the libprocstat(3) interface along with a procstat_get_shm_info() to export the mode and size of a shared memory object. - Change procstat to always print out the path for a given object if it is valid. - Teach fstat about shared memory objects and to display their path, mode, and size. MFC after: 2 weeks
* Remove trailing whitespace per mdoc lint warningeadler2012-03-291-1/+1
| | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* Backout r230934 which didn't work with unix sockets andpluknet2012-02-271-34/+8
| | | | | | several filesystem layers mounted at the specified path. Pointy hat to: pluknet
* Print the owner process for unix domain sockets when restricted to thepluknet2012-02-031-8/+34
| | | | | | | specified files. PR: bin/143962 MFC after: 2 weeks
* Spelling fixes for usr.bin/uqs2011-12-301-1/+1
|
* Mark global functions and/or variables in fstat(1) static where possible.ed2011-11-062-11/+11
| | | | This allows compilers and static analyzers to more thorough analysis.
* Correct column with for device numbers made in previous change.ed2011-10-011-1/+1
| | | | The device number should be displayed using only five columns -- not eight.
* Get rid of major/minor number distinction.ed2011-09-282-5/+5
| | | | | | | | | | | | | | | | | | | | | | As of FreeBSD 6, devices can only be opened through devfs. These device nodes don't have major and minor numbers anymore. The st_rdev field in struct stat is simply based a copy of st_ino. Simply display device numbers as hexadecimal, using "%#jx". This is allowed by POSIX, since it explicitly states things like the following (example taken from ls(1)): "If the file is a character special or block special file, the size of the file may be replaced with implementation-defined information associated with the device in question." This makes the output of these commands more compact. For example, ls(1) now uses approximately four columns less. While there, simplify the column length calculation from ls(1) by calling snprintf() with a NULL buffer. Don't be afraid; if needed one can still obtain individual major/minor numbers using stat(1).
* fuser: Fix skipping "SIG" on signal names (-s).jilles2011-06-181-3/+2
| | | | | | | The code did !strncasecmp(str, "sig", 4) which is not useful. Also change "sig" to "SIG" matching the uppercase signal names as of r218285. This has little effect because fuser does not enable locale.
* mdoc: reorder sections consistentlyuqs2011-06-021-10/+10
|
* - Fix several typos [1]stas2011-05-141-6/+11
| | | | | | | - fuser(1) writes usernames to stderr, not stdout [1] - Add history section. Submitted by: Pieter de Goeje <pieter@degoeje.nl> [1]
* uintmax_t is a better type here...imp2011-05-121-1/+1
| | | | Submitted by: avg@
* Fix printf int mismatch on 32-bit architectures...imp2011-05-121-2/+3
|
* - Commit work from libprocstat project. These patches add support for runtimestas2011-05-1210-1199/+817
| | | | | | | | | | | | | | | | | | | | | | | file and processes information retrieval from the running kernel via sysctl in the form of new library, libprocstat. The library also supports KVM backend for analyzing memory crash dumps. Both procstat(1) and fstat(1) utilities have been modified to take advantage of the library (as the bonus point the fstat(1) utility no longer need superuser privileges to operate), and the procstat(1) utility is now able to display information from memory dumps as well. The newly introduced fuser(1) utility also uses this library and able to operate via sysctl and kvm backends. The library is by no means complete (e.g. KVM backend is missing vnode name resolution routines, and there're no manpages for the library itself) so I plan to improve it further. I'm commiting it so it will get wider exposure and review. We won't be able to MFC this work as it relies on changes in HEAD, which was introduced some time ago, that break kernel ABI. OTOH we may be able to merge the library with KVM backend if we really need it there. Discussed with: rwatson
* Finally... Import the latest open-source ZFS version - (SPA) 28.pjd2011-02-271-0/+1
| | | | | | | | | | | | | | | Few new things available from now on: - Data deduplication. - Triple parity RAIDZ (RAIDZ3). - zfs diff. - zpool split. - Snapshot holds. - zpool import -F. Allows to rewind corrupted pool to earlier transaction group. - Possibility to import pool in read-only mode. MFC after: 1 month
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-113-12/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Fix typos and spelling mistakes.joel2010-08-061-1/+1
|
* 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
OpenPOWER on IntegriCloud