| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
| |
Reported-by: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently the original author(s) of this table did not know how to
start a table entry in the first column of a tbl(1) table with a dot.
(If you try, the *roff formatter will interpret it as a control line,
and try to invoke a request or call a macro.)
Start every row of the table with the *roff dummy character `\&` instead
of leading space. Not only is this more idiomatic, but it recovers some
of the line length for content.
This patch does not attempt to correct any errors in the table contents,
nor bring it up to date from its year 2000 vintage.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The extension of the page length is workaround for
<https://savannah.gnu.org/bugs/?63449>, which is a very old groff bug,
possibily dating back to groff 1.00 or beyond. It is fixed in groff
Git. But waiting for a groff release is not necessary; man-db man(1)
nowadays conceals diagnostic messages from the formatter and output
drivers.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cc: Martin Sebor <msebor@redhat.com>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Andrew Pinski <pinskia@gmail.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite to be consistent with the new string_copying.7 page.
Cc: Martin Sebor <msebor@redhat.com>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Andrew Pinski <pinskia@gmail.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite to be consistent with the new string_copying.7 page.
Cc: Martin Sebor <msebor@redhat.com>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Andrew Pinski <pinskia@gmail.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
new links to string_copying(7)
Cc: Martin Sebor <msebor@redhat.com>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Andrew Pinski <pinskia@gmail.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an opportunity to use consistent language across the
documentation for all string-copying functions.
It is also easier to show the similarities and differences between all
of the functions, so that a reader can use this page to know which
function is needed for a given task.
Alternative functions not provided by libc have been given in the same
page, with reference implementations.
Cc: Martin Sebor <msebor@redhat.com>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Andrew Pinski <pinskia@gmail.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
| |
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scripted change:
$ grep -l -x '^[.]TS$' man*/* | sort -u | xargs sed -i -e "1i'\\\\\" t"
Link: <https://lore.kernel.org/linux-man/07a7d4e7-79a6-b2c3-6892-1e39a0679f27@gmail.com/T/#mcf36c8a387fd5ff4f800dc220e3dbdd229b556bd>
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to make sure that we have correct \" t comments in the pages,
which are necessary for the Debian package checker:
On 8/19/22 22:21, Jakub Wilk wrote:
> * Michael Kerrisk <mtk.manpages@gmail.com>, 2020-07-24 12:13:
>> For 15 years or at least, I've not paid any attention to adding the
>> 't' comments when I added tables to pages, and I do recall anyone
>> reporting ill effects. So, I'm inclined to apply Mike's patch, but
>> will hold off a moment, in case there's other feedback.
>
> I'm a bit late, but...
>
> Lintian, the Debian package checker, sets the MANROFFSEQ environment
> variable to empty string as a speed optimization. This turns off
> loading preprocessors that weren't explicitly declared in the source.
> The lack of '\" comments can cause false positives (and maybe also
> false negatives?) in Lintian.
>
> The use of $MANROFFSEQ for Lintian was proposed here:
> https://bugs.debian.org/677874
>
> Beware that the man(1) man page does not correctly explain what
> $MANROFFSEQ does: <https://bugs.debian.org/971009>
Also update the dependencies list, since now we also need head(1) and
tail(1) for linting man(7) source.
Link: <https://lore.kernel.org/linux-man/07a7d4e7-79a6-b2c3-6892-1e39a0679f27@gmail.com/T/#mcf36c8a387fd5ff4f800dc220e3dbdd229b556bd>
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
| |
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
| |
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
| |
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
| |
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
| |
commit d7ba612d0 ("copy_file_range.2: Update cross-filesystem support
for 5.12") prematurely documented kernel 5.12 as the version that
changes the cross-fs copy_file_range() behavior, but that behavior
change was only merged in kernel version 5.19.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `scanf()` function does not intentionally set `errno` to `ERANGE`.
That is just a side effect of the code that it uses to perform
conversions. It also does not work as reliably as indicated in the
'man' page when the target integer type is narrower than `long`.
Typically (at least in glibc) for target integer types narrower than
`long`, the number has to exceed the range of `long` (for signed
conversions) or `unsigned long` (for unsigned conversions) for `errno`
to be set to `ERANGE`.
Documenting `ERANGE` in the ERRORS section kind of implies that
`scanf()` should return `EOF` when an integer overflow is encountered,
which it doesn't (and doing so would violate the C standard).
Just remove any mention of the `ERANGE` error to avoid confusion.
Fixes: 646af540e467 ("Add an ERRORS section documenting at least some of the errors that may occur for scanf().")
Link: <https://lore.kernel.org/linux-man/5af4f708-337f-fddf-9a2d-e0e4602d3a72@mev.co.uk/T/#m900a1b1741afefab008a69e6b76919cd94aa81ef>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Zack Weinberg <zack@owlfolio.org>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
| |
Use of numeric conversion specifiers can produce Undefined Behvaior
under conditions that the program doesn't control; therefore, there's no
way to use them safely.
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Zack Weinberg <zack@owlfolio.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
| |
Reported-by: Luca Versari <veluca93@gmail.com>
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=216648>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
| |
Cowritten-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Ingo Schwarze <schwarze@openbsd.org>
Cc: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
| |
Reported-by: 1092615079 <1092615079@qq.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
| |
See the previous commit.
Reported-by: Luis Javier Merino <ninjalj@gmail.com>
Cc: Tycho Andersen <tycho@tycho.pizza>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our group recently had some confusion around this. Although f327722042df
("socket.7: Explain effect of SO_SNDTIMEO for connect()") adds a mention of
connect(2), the wording around "Timeouts only have effect for system
calls that perform socket I/O" is slightly confusing: is connect(2) I/O?.
Let's just add connect(2) to the list of things that time out explicitly to
avoid any confusion.
Test program for grins:
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
int main(void)
{
struct sockaddr_in servaddr = {
/* tycho.pizza */
.sin_addr.s_addr = inet_addr("192.241.255.151"),
.sin_port = htons(443),
.sin_family = AF_INET,
};
int fd;
struct timeval timeout = {
.tv_sec = 0,
.tv_usec = 100,
};
fd = socket(AF_INET, SOCK_STREAM, 0);
if (fd < 0) {
perror("socket");
return 1;
}
if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)) < 0) {
perror("setsockopt");
return 1;
}
if (connect(fd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) {
perror("connect");
return 1;
}
printf("connect successful\n");
return 0;
}
$ ./so_sndtimeo
connect: Operation now in progress
Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
| |
With the right function call, that is, one that always copies the same
amount of bytes, and is so simple that can be inlined, the behavior
will be consistent enough to be warned by the compiler in most cases of
overrun, and crash quite consistently in the remaining.
Prefer simplicity over correctness, so suggest the simpler ustr2stp().
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After some investigation, I found a case where this function is useful:
Concatenating an unterminated string into a string. It's not an ideal
API for that, but there's no other API that does it.
The closest thing, and something that some projects use instead of
strncat(3), is calling mempcpy(3) directly. However mempcpy(3) isn't
ideal either (it's faster; just that). It even requires a multiline
pattern to use correctly, which is a source of bugs.
So, suggest using a custom alternative that needs to be defined by the
programmer, which handles all the subtle details much better than any
of the conventional functions: ustr2stpe().
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
| |
The prototype for strncat(3) was wrong. Fix it.
Mark the functions as obsolete.
Fix the descriptions, to remove misleading text.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
| |
Never use this function. Really.
Cc: <pkg-shadow-devel@alioth-lists.debian.net>
Cc: <libc-alpha@sourceware.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
|
|
| |
I had a mistake when adding VLA syntax to this prototype. From this
fixed prototype, it's visible how broken the design for this function
is. Next move is to kill this function.
Cc: <libc-alpha@sourceware.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
| |
Use concise wording to make the points more direct.
This function is rarely used for its only valid purpose.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
| |
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
| |
Those are not caveats, but actual bugs. This function was misdesigned.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
| |
It is equivalent, but reports truncation.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
| |
To make it more visible; and refer CAVEATS to still discourage its use.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
| |
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
|
| |
strncpy(3) is completely unrelated to strcpy(3). Rewrite its
documentation to be more explicit about this.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
|
|
|
|
| |
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Cc: Mario Blättermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|