| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
for non-empty directories.
POSIX permits both ENOTEMPTY and EEXIST, but we use the clearer ENOTEMPTY,
following BSD tradition.
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
Also add xrefs for confstr(3) (as sysconf(3) but for strings) and kvm(3)
(which is a more convenient way to access some of the variables).
PR: 116480
MFC after: 1 week
|
|
|
|
|
| |
Suggested by: bde
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
of NULL and changed type in declaration.
Suggested by: bde
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
| |
Add small optimization, do not copy a string to the buffer that is
to be freed immediately after.
Noted by: jh [1]
Reviewed by: jh
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
SUSv4 requires that implementation returns EINVAL if supplied path is NULL,
and ENOENT if path is empty string [1].
Bring prototype in conformance with SUSv4, adding restrict keywords.
Allow the resolved path buffer pointer be NULL, in which case realpath(3)
allocates storage with malloc().
PR: kern/121897 [1]
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
| |
Simplify the presented declaration of struct sigaction, noting the
caveat in the text. Real layout of the structure and exposed
implementation namespace only obfuscates the usage.
Submitted by: bde
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX permits but does not require checking access on the current and parent
directories.
Because various programs do not like it if getcwd(3) fails, it seems best
to avoid checking access as much as possible. There are various reports in
GNATS about this (search for getcwd).
Our getcwd(3) implementation first queries the kernel for the pathname
directly, which does not check any permissions but sometimes fails, and then
falls back to reading all parent directories for the names.
PR: standards/44425
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
Example: fnmatch("a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD)
PR: 116074
MFC after: 1 week
|
|
|
|
|
|
|
| |
of argument declaration is needed.
Discussed with: bde
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.
Reviewed by: ru
Approved by: philip, ed (mentors)
|
|
|
|
|
|
|
|
|
| |
Be explicit and use the general bracketing form plus symbols which are
to be interpreted mathematically in this case.
Complaint by: mdocml
Reviewed by: ru
Approved by: philip, ed (mentors)
|
|
|
|
|
|
|
| |
This trips up mdocml and can simply go away.
Reviewed by: ru
Approved by: philip, ed (mentors)
|
|
|
|
| |
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and
UltraSPARC processors defines that in all cases tininess is detected
before rounding therefore rounding up to the smallest normalized number
should set the underflow flag. This change is needed for using SoftFloat
on sparc64 for reference purposes.
PR: 144900
Submitted by: Peter Jeremy
|
| |
|
|
|
|
| |
ANSIfy vasprintf() while I'm here.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fix mostly matters after r206129 that made it possible for
st_blksize to be greater than 4K. For this reason, this change should
be MFC-ed before r206129.
Also, it seems that all FreeBSD uitlities that use db(3) hash databases
and create new databases in files, specify their own block size value
and thus do not depend on block size autotuning.
PR: bin/144446
Submitted by: Peter Jeremy <peterjeremy@acm.org>
MFC after: 5 days
|
|
|
|
|
|
| |
PR: bin/144446
Submitted by: Peter Jeremy <peterjeremy@acm.org>
MFC after: 3 days
|
|
|
|
|
|
| |
specifying `db' as source of service in /etc/nsswitch.conf.
MFC after: 2 weeks
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
|
| |
the logic bit.
MFC after: 2 weeks
|
|
|
|
|
|
| |
lines terminated with '\n'.
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
| |
While I'm there, apply __unused whenever appropriate.
Reviewed by: md5(1)
|
|
|
|
|
| |
PR: amd64/145091
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A nice thing about POSIX 2008 is that it finally standardizes a way to
obtain file access/modification/change times in sub-second precision,
namely using struct timespec, which we already have for a very long
time. Unfortunately POSIX uses different names.
This commit adds compatibility macros, so existing code should still
build properly. Also change all source code in the kernel to work
without any of the compatibility macros. This makes it all a less
ambiguous.
I am also renaming st_birthtime to st_birthtim, even though it was a
local extension anyway. It seems Cygwin also has a st_birthtim.
|
|
|
|
|
| |
Approved by: cognet
MFC after: 1 week
|
|
|
|
|
|
| |
PR: kern/71258
Submitted by: Alexander Best
MFC after: 2 weeks
|
|
|
|
|
| |
I am not removing the fstat() calls here, since we cannot yet assume
people will always run kernels that respect O_DIRECTORY.
|
|
|
|
|
|
| |
According to POSIX open() must return ENOTDIR when the path name does
not refer to a path name. Change vn_open() to respect this flag. This
also simplifies the Linuxolator a bit.
|
|
|
|
|
|
|
|
| |
default strict aliasing rules.
PR: 144900
Submitted by: Peter Jeremy
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and
UltraSPARC processors defines that in all cases tinyness is detected
before rounding, therefore rounding up to the smallest normalised
number should set the underflow flag.
- If an infinite result is rounded down, the result should have an
exponent 1 less than the value for infinity.
PR: 144900
Submitted by: Peter Jeremy
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
the dividend is infinity or zero and the divisor is not the same.
PR: 144900
Submitted by: Peter Jeremy
MFC after: 3 days
|
|
|
|
|
|
| |
PR: 144900
Submitted by: Peter Jeremy
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
the low bits also in the default case.
PR: 144900
Obtained from: OpenBSD
MFC after: 3 days
|
|
|
|
| |
- Fix whitespace.
|
|
|
|
| |
from FreeBSD for other purposes.
|
|
|
|
|
| |
Pointy hat to: delphij
MFC after: 1 month
|
|
|
|
| |
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
blog posting [1].
- Use word-sized test for unaligned pointer before working
the hard way.
Memory page boundary is always integral multiple of a word
alignment boundary. Therefore, if we can access memory
referenced by pointer p, then (p & ~word mask) must be also
accessible.
- Better utilization of multi-issue processor's ability of
concurrency.
The previous implementation utilized a formular that must be
executed sequentially. However, the ~, & and - operations can
actually be caculated at the same time when the operand were
different and unrelated.
The original Hacker's Delight formular also offered consistent
performance regardless whether the input would contain
characters with their highest-bit set, as it catches real
nul characters only.
These two optimizations has shown further improvements over the
previous implementation on microbenchmarks on i386 and amd64 CPU
including Pentium 4, Core Duo 2 and i7.
[1] http://vger.kernel.org/~davem/cgi-bin/blog.cgi/2010/03/08#strlen_1
MFC after: 1 month
|
|
|
|
|
|
| |
Found by: make manlint
Reviewed by: ru
Approved by: philip (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
| |
by *sprintf(), etc.
- Explicitly initialize _fl_mutex to PTHREAD_MUTEX_INITIALIZER for all FILE
objects. This is currently a nop on FreeBSD, but is import for other
platforms (or in the future) where PTHREAD_MUTEX_INITIALIZER is not simply
zero.
PR: threads/141198
Reported by: Jeremy Huddleston @ Apple
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
tcp_key and udp_key that shadows the global definition.
PR: threads/144558
Submitted by: Sam Robb
|
|
|
|
|
|
| |
the opmask array.
Pointed out by: Peter Jeremy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
operands but not for double and extended double ones. Instead of trying
to fix the macro just nuke it and unroll the loops in the correct way
though as extended double operands turn out to be the only special case.
- For FxTO{s,d,q} the source operand is int64 so rs2 has to be re-decoded
after setting type accordingly as it's generally decoded using the low
2 bits as the type, which are 0 for these three instructions.
- Similarly, in case of F{s,d,q}TOx the target is int64 so rd has to be
re-decoded using not only the operand mask appropriate for int64 but
also the correct register number encoding.
- Use const where appropriate.
- Wrap long lines.
Submitted by: Peter Jeremy (partly)
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
| |
objects used to provide per-thread storage in the RPC code. Almost all
of these used double-checking with a dedicated mutex (tsd_lock) to do this
before. However, that is not always safe with more relaxed memory orders.
There were also other bugs, such as one in __rpc_createrr() that caused a
new key to be allocated each time __rpc_createrr() was invoked.
PR: threads/144558
Reported by: Sam Robb samrobb of averesystems com (key leak)
MFC after: 1 week
|
|
|
|
| |
Approved by: jedgar
|