This test creates two files like file0 and file1,
then creates link to file1 and checks ctime on it.
Then renames file0 to file1. Then checks ctime on
link again. It is expected, that second ctime will
be higher then first ctime, because rename happen.
Add ctime updating for directory entry,
which will be deleted on rename.
Reviewed by: kib
MFC after: 2 week
Differential revision: https://reviews.freebsd.org/D38051
The rename call with args like:
"./dir0/dir1/.." "./dir2" will cause MPASS failure.
The tmpfs_dir_lookup() does not accept names like
'.' and '..' for lookup. Move the '.' and '..' entry
check before tmpfs_dir_lookup() call.
Reviewed by: kib
MFC after: 2 week
Differential revision: https://reviews.freebsd.org/D38051
The sources of this program are in contrib/bc, but built using the
Makefiles touched in this commit, which had to be adapted to comply
with changed made to the build system of this software, which is
not used when building in the base system.
This update fixes a few issues in history editing and the processing
of the "quit" function. The "quit" function will no longer cause bc
to exit when encountered in a script file (before any command from
the script has been executed).
New functions is_number(), is_string return 1 if the passed argument
is a number resp. a string. The asciify() function has been extended
to support the conversion of an array of numbers into a string.
Merge commit '1a63323d17fedb05b6962853e821c9d7c6b9853e'
This is a production release that fixes a bug.
The bug was that if an array element was used as a parameter, and then
a later parameter had the same name as the array whose element was
used, bc would grab the element from the new array parameter, not the
actual element from before the function call.
This is a production release with a new feature and a few bug fixes.
The bug fixes include:
- A crash when bc and dc are built using editline, but history is not
activated.
- A missing local in the uint*() family of functions in the extended
math library.
- A failure to clear the tail call list in dc on error.
- A crash when attempting to swap characters in command-line history
when no characters exist.
- SIGWINCH was activated even when history was not.
The new feature is that stack traces are now given for runtime errors.
In debug mode, the C source file and line of errors are given as well.
This is a production release that fixes a discrepancy from the bc
standard, a couple of memory bugs, and adds new features.
The discrepancy from the bc standard was with regards to the behavior
of the quit command. This bc used to quit whenever it encountered quit
during parsing, even if it was parsing a full file. Now, bc only quits
when encountering quit after it has executed all executable statements
up to that point.
This behavior is slightly different from GNU bc, but users will only
notice the difference if they put quit on the same line as other
statements.
The first memory bug could be reproduced by assigning a string to a
non-local variable in a function, then redefining the function with
use of the same non-local variable, which would still refer to a
string in the previous version of the function.
The second memory bug was caused by passing an array argument to the
asciify() built-in function. In certain cases, that was wrongly
allowed, and the interpreter just assumed everything was correct and
accessed memory. Now that arrays are allowed as arguments (see below),
this is not an issue.
The first feature was the addition of the is_number() built-in
function (u in dc) that returns 1 if the runtime argument is a number
and 0 otherwise.
The second feature was the addition of the is_string() built-in
function (t in dc) that returns 1 if the runtime argument is a string
and 0 otherwise.
These features were added because I realized that type-checking is
necessary now that strings can be assigned to variables in bc and
because they've always been assignable to variables in dc.
The last added feature is the ability of the asciify() built-in
function in bc to convert a full array of numbers into a string. This
means that character-by-character printing will not be necessary, and
more strings than just single-character ones will be able to be
created.
Rework the routines to convert a native statfs structure (with fixed-size 64-bit
counters) to a Linux statfs structure (with long-sized counters) for 32-bit apps.
Instead of following Linux and return an EOVERFLOW error from statfs() family of
syscalls when actual fs stat value(s) are large enough to not fit into 32 bits,
apply scale logics used by FreeBSD to convert a 5.x statfs structure to a 4.x
statfs structure.
For more details see cc479dda.
Tested by: glebius
MFC after: 1 week
Relevant/interesting changes (see ChangeLog for more):
o variables like .newline and .MAKE.{GID,PID,PPID,UID}
should be read-only.
o .[NO]READONLY: for control of read-only variables
o .SYSPATH: for controlling the path searched for makefiles
o allow for white-space between command specifiers @+-
o add more details to warning 'Extra targets ignored'
o make.1: sync list of built-in variables with reality
sort list of built-in variables
o cond.c: add more details to error message for numeric comparison
o job.c: fix handling of null bytes in output
o Allow .break to terminate a .for loop early
o var.c: fix out-of-bounds errors when parsing
o fix exit status for '-q' (since 1994)
This KPI was removed in d223372545. Note that there are a handful of
references remaining in the src tree to these rtalloc functions that
could be cleaned up by someone with more domain knowledge.
Reviewed by: pauamma (manpages), glebius, melifaro
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38188
The PCBGROUP option and KPI were removed entirely in 93c67567e0.
Reviewed by: pauamma (manpages), glebius, melifaro
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38187
They were defined in the i915 DRM driver. I move the code in linuxkpi so
it can benefit other drivers.
Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38078
It now returns a `struct scatterlist *` pointer instead of an error
code only.
The implementation is incomplete because it doesn't use the `prv`
argument.
Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38077
At least one file in the DRM drivers benefits from some namespace
pollution to use `fs_reclaim_acquire()`/`fs_reclaim_release()`. They are
defined in `linux/sched/mm.h` and this header must be included
indirectly into the DRM drivers' source file.
I couldn't find how it was included. Therefore this commit includes
`linux/sched/mm.h` from `linux/sched.h`. This is not the case in Linux
but fixes the issue with the DRM drivers.
Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D37912
The default function are enough for md so use them instead of the
disks ones that doesn't work for it anymore.
Reviewed by: imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
MFC after: now
Differential Revision: https://reviews.freebsd.org/D38218
This is done by reverting CR4_PKE bit, because we perform %CR4
initialization in initializecpu(), and the function is called before
xsave_mask is read. To not redo the whole early initialization
sequence for the corner case, this should be good enough.
Reported by: jhb
Reviewed by: jhb, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38219
This covers all currently defined bits, adding PKRU and TILE.
Reviewed by: jhb, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D38219
The original motivation (src.opts.mk needing bsd.comppiler.mk to
determine if CXX is supported) is no longer relevant now that CXX is
non-optional.
This reverts commit b9cb80883b.
Merge commit 'b3392d84da5bf2162baf937c77e0557f3fd8a52b' into zstd_1.5.2
full changelog: https://github.com/facebook/zstd/compare/v1.4.8...v1.5.2
Updated sys/kern/subr_compressor.c to new API
MFC after: 3 days
Relnotes: yes
Sponsored by: Klara, Inc.
This change switches route listing in netstat to netlink, with fallback to rtsock.
The outputs are mostly identical, with an exception of not showing kernel
nexthop indexes for multipath routes.
Differential Revision: https://reviews.freebsd.org/D36529
The functions are intended to report kernel variables that are
stored as sbintime_t (pointed to by arg1) as human readable
nanoseconds or milliseconds (reported via sysctl_handle_64).
The variable types and names were reversed. I guess there is
no functional change here, as all types flipped around were
signed 64. Note that these function aren't used yet anywhere
in the kernel.
Reviewed by: mav
Differential revision: https://reviews.freebsd.org/D38217
Several important base system components are written in C++, and the
WITHOUT_CXX option produced a system that was not fully functional.
Just accept this, and remove the option to build without C++ support.
This reverts commit adc3c128c6.
Reviewed by: brooks, kevans, jhb (earlier)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33108
This ensures that __generic() more closely matches _Generic() when
using the fallback version when _Generic() is not available (such as
GCC).
Co-authored by: jrtc27
Reviewed by: jrtc27
Differential Revision: https://reviews.freebsd.org/D38215