Reported by: Mark Millard on freebsd-current@
Fixes: c763f99d11fd ("elfctl: prefix disable flags with "no"")
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
The current implementation of sysctlbyname() does not support the user
sub-tree. This function exits with a return value of 0, but sets the
passed string buffer to an empty string.
As a result, the whereis program did not use the value of the sysctl
variable "user.cs_path", but only the value of the environment
variable "PATH".
This update makes whereis use the sysctl function with a fixed OID,
which already supports the user sub-tree.
MFC after: 3 days
The inp_gencnt will be used to identify a TCP endpoint by an upcoming
command line tool to set TCP socket options.
Reviewed by: rscheff
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D34137
An empty database is a database which does not contain any filenames.
It should not occur in practice but maybe in the case of an error.
echo | /usr/libexec/locate.mklocatedb > empty.db; locate -d empty.db -S
For historical reasons, the integer is stored with an offset of plus 14.
That means, for a given max path length of 1024 the valid values
are -1009 .. 1037 and not -1023 .. 1023
PR: 201243
Providing a timestamp with seconds granularity helps make it obvious
that the display is updating.
Reviewed by: mckusick
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29181
- stop on first error
- improve awk script: print the last two characters for bigram - not the second word
- remove unnecessary checks
- use mktemp
- refactor
- Check that catopen() succeeded before calling catclose(). musl will
crash in the latter if the catalogue descriptor is -1.
- Keep the message catalogue open for most of sort(1)'s actual
operation.
- Don't use catgets(3) to print error messages if catopen(3) had failed.
Reviewed by: arichardson, emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34081
This doesn't work with musl, which defines stdout as FILE * const.
Instead, explicitly pass the desired output stream to ar_read_archive().
No functional change intended.
Reviewed by: emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34064
gzip has SMALL conditionals which enable building a reduced size version
of the binary. These exist as part of the introduction of BSD licensed
gzip in 2004 in NetBSD and appear to have been required to reach a size
for inclusion in their install media. For more information see commits
to gzip in the NetBSD tree on the 28th of March 2004.
SMALL doesn't appear to be hooked up to our build system and
complicates gzip quite a bit.
Reviewed by: kevans, imp
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D34047
When run with test, verbose and list we need to parse the file otherwise
the test output is "NOT OK" even for the file is valid.
Reviewed by: kevans, allanjude, imp
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D34046
By default BSD sort(1) uses 90% (or at least 50%?) of the available
main memory. That is good for performance for a single job, but not
for a shared OS. For a long running script the performance is less
important than the stability of the server. Also, if a server
with 64GB RAM starts swapping, the performance goes south and
hurts other running applications.
Note: this change does not affect the weekly cron job to
rebuild the locate database. The FreeBSD locate.updatedb
use the -presort option (find -s)
This fixes an integer overflow for very large partitions around 35 billion
filenames (>2PB). However, in an artificially worst case it may occurs
by only 17 mio filenames on a partition.
This flag allows a full text search on man pages. Although this is a last resort
option, it can be useful to pin point a certain man page.
It can be used with -S to narrow the search.
Unlike the Linux version, the search takes place in the rendered text so it
avoids false-positives when the text is found in comments in the source files.
It relies on `grep(1)` and `mandoc(1)` to do its job.
Add flag documentation and EXAMPLES to the manual page (bump .Dd).
Usage example:
man -w -K '\<arm\>' -S 1:8
Reviewed By: ceri, emaste, pauamma_gundo.com
Approved by: manpages (bcr@), debdrup@
Differential Revision: https://reviews.freebsd.org/D30984
We have the authorization from the University of California to remove
the advertising clause for a while, wosch@ who also hold a copyright
on this code also approved the relicensing
Approved by: wosch@
MFC after: 3 days
Let "fetch -a" resume truncated transfer automatically
perform another attempt if it obtained some new data in previous one
making progress.
This makes it more robust against frequent but transient network failures.
For example:
=> sqlite-src-3370200.zip doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://www.sqlite.org/2022/sqlite-src-3370200.zip
sqlite-src-3370200.zip 3% of 12 MB 45 kBps 04m24s
fetch: sqlite-src-3370200.zip appears to be truncated: 524288/13145234 bytes
sqlite-src-3370200.zip 10% of 12 MB 67 kBps 02m56s
fetch: sqlite-src-3370200.zip appears to be truncated: 1327104/13145234 bytes
sqlite-src-3370200.zip 28% of 12 MB 123 kBps 01m14s
fetch: sqlite-src-3370200.zip appears to be truncated: 3735552/13145234 bytes
sqlite-src-3370200.zip 54% of 12 MB 253 kBps 24s
fetch: sqlite-src-3370200.zip appears to be truncated: 7176192/13145234 bytes
sqlite-src-3370200.zip 62% of 12 MB 90 kBps 55s
fetch: sqlite-src-3370200.zip appears to be truncated: 8241152/13145234 bytes
sqlite-src-3370200.zip 82% of 12 MB 113 kBps 20s
fetch: sqlite-src-3370200.zip appears to be truncated: 10862592/13145234 bytes
sqlite-src-3370200.zip 12 MB 185 kBps 12s
===> Fetching all distfiles required by sqlite3-3.37.2,1 for building
MFC after: 1 month
The text after .error et al is emitted verbatim.
Reviewed by: sjg
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33904