| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add mountpoint(1), a simple utility to tell whether the file pointed
to by the argument is a mount point. It prints whether it is, unless
-q is given, and exits 0 if it is, 1 if it is not, and 2 on error.
The answer comes from the kernel with a single stat(2): the root vnode
of a mounted file system is reported with SFBSD_MNTPOINT in
st_bsdflags. Unlike comparing realpath(3) of the argument with that
of statfs(2)'s f_mntonname, this works for arbitrarily deep
hierarchies, and after chroot(2) or inside a jail. A chroot or jail
root is reported as a mount point only if it is one.
The argument does not have to be a directory: file systems such as
nullfs(5) can be mounted over regular files and sockets, and stat(2)
reports those mount points as well.
Since all that is needed is one stat(2) call, make mountpoint a
hardlink to stat(1), the same way readlink(1) is, and document it in
stat.1.
Add ATF tests, including chroot(8) and jail(8) roots that are and are
not mount points, nullfs roots, file systems mounted inside the root,
both from the host and from within the jail, and a nullfs mount of a
file over a file.
Suggested by: kib
Differential revision: https://reviews.freebsd.org/D59906
Sponsored by: Sippy Software, Inc.
MFC after: 2 weeks
|
| |
|
|
|
|
|
| |
This is a residual of the $FreeBSD$ removal.
MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Notes:
svn path=/projects/make-check-sandbox/; revision=321911
|
| |
|
|
|
|
|
|
|
|
| |
The tests exercise -f (f_flag), -n (n_flag), and no arguments (basic).
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=319834
|
| |
|
|
| |
Notes:
svn path=/head/; revision=216206
|
| |
|
|
| |
Notes:
svn path=/head/; revision=140941
|
| |
|
|
|
|
|
|
|
| |
bsd.*.mk infrasture.
Obtained from: ru
Notes:
svn path=/head/; revision=140909
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Update the code to the latest from NetBSD, which includes:
* A new command line option to suppress stat(2) errors
* Output is now done via stdio
* Fixes for bitwise OR'ing of letters
2. Andrew from NetBSD merged in our own Johan's readlink patches.
3. Andrew also merged in some brucifications.
I made some small contributions to the header cleanup, and tried
to generally improve the overall style(9)'ishness. I also documented
the new -q option and added the *LINKS to the Makefile.
All responsibility for mistakes in merging the contributions
from the above is mine.
Obtained from: Andrew Brown <atatat@NetBSD.org>, bde, johan
Notes:
svn path=/head/; revision=101773
|
|
|
Notes:
svn path=/vendor/NetBSD/dist/; revision=97952
|