Re: Navigational corrections

2020-10-05 Thread Alejandro Colomar
Hi Michael, On 2020-10-03 13:39, Michael Kerrisk (man-pages) wrote: Hi Alex, [...] off_t would be great. In case you are looking for some other candidates, some others that I would be interested to see go into the page would be fd_set clock_t clockid_t and probably dev_t Great! off_t is

[PATCH 2/2] off_t.3: New link to system_data_types(7)

2020-10-05 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/off_t.3 | 1 + 1 file changed, 1 insertion(+) create mode 100644 man3/off_t.3 diff --git a/man3/off_t.3 b/man3/off_t.3 new file mode 100644 index 0..db50c0f09 --- /dev/null +++ b/man3/off_t.3 @@ -0,0 +1 @@ +.so man7/system_data_types.7

[PATCH 1/2] system_data_types.7: Add 'off_t'

2020-10-05 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man7/system_data_types.7 | 50 1 file changed, 50 insertions(+) diff --git a/man7/system_data_types.7 b/man7/system_data_types.7 index b8cbc8ffe..916efef08 100644 --- a/man7/system_data_types.7 +++ b/man7

Re: [PATCH v2 1/2] system_data_types.7: Add 'void *'

2020-10-02 Thread Alejandro Colomar
Hi Paul, On 2020-10-01 19:32, Paul Eggert wrote: > If you're going to document this at all, I suggest documenting 'void' as > well as 'void *', and putting both sets of documentation into the same > man page. > All the types we're documenting are in the same page: system_data_types(7). And then

Re: [PATCH v2 1/2] system_data_types.7: Add 'void *'

2020-10-02 Thread Alejandro Colomar
Hi Michael, On 2020-10-02 10:24, Alejandro Colomar wrote: On 2020-10-01 19:32, Paul Eggert wrote: > For 'void *' you should also mention that one cannot use arithmetic on > void * pointers, so they're special in that way too. Good suggestion! > Also, you should > warn that bec

[PATCH] system_data_types.7: void *: Add info about generic function parameters and return value

2020-10-02 Thread Alejandro Colomar
Reported-by: Paul Eggert Reported-by: David Laight Signed-off-by: Alejandro Colomar --- Paul and David, Thanks for your input! Alex man7/system_data_types.7 | 16 1 file changed, 16 insertions(+) diff --git a/man7/system_data_types.7 b/man7/system_data_types.7 index

[PATCH 2/2] system_data_types.7: void *: Add info about pointer artihmetic

2020-10-02 Thread Alejandro Colomar
Reported-by: Paul Eggert Reported-by: David Laight Signed-off-by: Alejandro Colomar --- Paul and David, Thanks for your input! Alex man7/system_data_types.7 | 11 +++ 1 file changed, 11 insertions(+) diff --git a/man7/system_data_types.7 b/man7/system_data_types.7 index 6451782db

Re: [PATCH 2/2] system_data_types.7: void *: Add info about pointer artihmetic

2020-10-02 Thread Alejandro Colomar
Hi Michael, The 2/2 is a typo. This is a standalone patch. Cheers, Alex On 2020-10-02 11:44, Alejandro Colomar wrote: Reported-by: Paul Eggert Reported-by: David Laight Signed-off-by: Alejandro Colomar --- Paul and David, Thanks for your input! Alex man7/system_data_types.7 | 11

[PATCH 0/2] Document 'void *'

2020-10-02 Thread Alejandro Colomar
Hi Michael, As you asked, I squashed. And added the POSIX.1-2008 note too. Thanks for that! Cheers, Alex Alejandro Colomar (2): system_data_types.7: Add 'void *' void.3: New link to system_data_types(7) man3/void.3 | 1 + man7/system_data_types.7 | 80

[PATCH 2/2] void.3: New link to system_data_types(7)

2020-10-02 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/void.3 | 1 + 1 file changed, 1 insertion(+) create mode 100644 man3/void.3 diff --git a/man3/void.3 b/man3/void.3 new file mode 100644 index 0..db50c0f09 --- /dev/null +++ b/man3/void.3 @@ -0,0 +1 @@ +.so man7/system_data_types.7 -- 2.28.0

[PATCH 1/2] system_data_types.7: Add 'void *'

2020-10-02 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar system_data_types.7: void *: Add info about generic function parameters and return value Reported-by: Paul Eggert Reported-by: David Laight Signed-off-by: Alejandro Colomar system_data_types.7: void *: Add info about pointer artihmetic Reported-by: Paul

Re: [PATCH v2 1/2] system_data_types.7: Add 'void *'

2020-10-02 Thread Alejandro Colomar
On 2020-10-02 15:06, Jonathan Wakely wrote: > On Fri, 2 Oct 2020 at 12:31, Michael Kerrisk (man-pages) > wrote: >> >> On Fri, 2 Oct 2020 at 12:49, Jonathan Wakely wrote: >>> >>> On Fri, 2 Oct 2020 at 09:28, Alejandro Colomar via Gcc wrote: >>

Re: [PATCH v2 1/2] system_data_types.7: Add 'void *'

2020-10-02 Thread Alejandro Colomar
Hi Jonathan, On 2020-10-02 15:27, Jonathan Wakely wrote: On Fri, 2 Oct 2020 at 14:20, Alejandro Colomar wrote: On 2020-10-02 15:06, Jonathan Wakely wrote: > On Fri, 2 Oct 2020 at 12:31, Michael Kerrisk (man-pages) > wrote: >> >> On Fri, 2 Oct 2020 at 12:4

[PATCH v4 2/2] void.3: New link to system_data_types(7)

2020-10-02 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/void.3 | 1 + 1 file changed, 1 insertion(+) create mode 100644 man3/void.3 diff --git a/man3/void.3 b/man3/void.3 new file mode 100644 index 0..db50c0f09 --- /dev/null +++ b/man3/void.3 @@ -0,0 +1 @@ +.so man7/system_data_types.7 -- 2.28.0

[PATCH v4 0/2] Document 'void *'

2020-10-02 Thread Alejandro Colomar
it v4). Regards, Alex Alejandro Colomar (2): system_data_types.7: Add 'void *' void.3: New link to system_data_types(7) man3/void.3 | 1 + man7/system_data_types.7 | 80 +++- 2 files changed, 79 insertions(+), 2 deletions(-) create mode 100644

[PATCH v4 1/2] system_data_types.7: Add 'void *'

2020-10-02 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar system_data_types.7: void *: Add info about generic function parameters and return value Reported-by: Paul Eggert Reported-by: David Laight Signed-off-by: Alejandro Colomar system_data_types.7: void *: Add info about pointer artihmetic Reported-by: Paul

Re: [PATCH v4 1/2] system_data_types.7: Add 'void *'

2020-10-02 Thread Alejandro Colomar
Hi Paul, On 2020-10-02 18:53, Paul Eggert wrote: > On 10/2/20 8:14 AM, Alejandro Colomar wrote: > >> +.I void * > > GNU style is a space between "void" and "*", so this should be '.I > "void\ *"', both here and elsewhere. The backslash prev

[PATCH v5 0/2] Document 'void *'

2020-10-02 Thread Alejandro Colomar
), memcmp(3), memcpy(3), memset(3) See also the intptr_t and uintptr_t types in this page. ]] Alejandro Colomar (2): system_data_types.7: Add 'void *' void.3: New link to system_data_types(7) man3/void.3 | 1 + man7/system_data_types.7 | 76

[PATCH v5 1/2] system_data_types.7: Add 'void *'

2020-10-02 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar system_data_types.7: void *: Add info about generic function parameters and return value Reported-by: Paul Eggert Reported-by: David Laight Signed-off-by: Alejandro Colomar system_data_types.7: void *: Add info about pointer artihmetic Reported-by: Paul

[PATCH v5 2/2] void.3: New link to system_data_types(7)

2020-10-02 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/void.3 | 1 + 1 file changed, 1 insertion(+) create mode 100644 man3/void.3 diff --git a/man3/void.3 b/man3/void.3 new file mode 100644 index 0..db50c0f09 --- /dev/null +++ b/man3/void.3 @@ -0,0 +1 @@ +.so man7/system_data_types.7 -- 2.28.0

Re: [PATCH v4 1/2] system_data_types.7: Add 'void *'

2020-10-02 Thread Alejandro Colomar
Hi Paul, On 2020-10-02 22:14, Paul Eggert wrote: > On 10/2/20 11:38 AM, Alejandro Colomar wrote: > >> .I void * >> >> renders with a space in between. > > That's odd, as "man(7)" says "All of the arguments will be printed next > to each oth

Re: [PATCH v4 1/2] system_data_types.7: Add 'void *'

2020-10-03 Thread Alejandro Colomar
Hi Michael and Branden, On 2020-10-03 09:48, G. Branden Robinson wrote: At 2020-10-03T09:10:14+0200, Michael Kerrisk (man-pages) wrote: On 10/2/20 10:27 PM, Alejandro Colomar wrote: On 2020-10-02 22:14, Paul Eggert wrote: > On 10/2/20 11:38 AM, Alejandro Colomar wrote: > >

Re: Navigational corrections

2020-10-03 Thread Alejandro Colomar
Hi Michael, On 2020-10-03 10:00, Michael Kerrisk (man-pages) wrote: > Hi Alex, et al. > On 10/2/20 3:51 PM, Alejandro Colomar wrote: >> >> Hi Jonathan, >> >> On 2020-10-02 15:27, Jonathan Wakely wrote: >>> On Fri, 2 Oct 2020 at 14:20, Alejandro Colomar wr

Re: [PATCH] man2: new page describing memfd_secret() system call

2020-10-03 Thread Alejandro Colomar
Hi Mike and Michael, Ping. :) Thanks, Alex On 2020-09-24 16:55, Alejandro Colomar wrote: * Mike Rapoport: > +.PP > +.IR Note : > +There is no glibc wrapper for this system call; see NOTES. You added a reference to NOTES, but then in notes there is nothing about it.  I guess y

Re: [PATCH v4 1/2] system_data_types.7: Add 'void *'

2020-10-03 Thread Alejandro Colomar
On 10/3/20 9:48 AM, G. Branden Robinson wrote: [...] >> The "short" answer[1] is that I think Alex is correct; Paul's caution is >> unwarranted and arises from confusion with the font alternation macros >> of the man(7) macro package.  Examples of the latter are .BI and .BR. >> Those set their

Re: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-29 Thread Alejandro Colomar
On 2020-09-29 15:38, Michael Kerrisk (man-pages) wrote: 2.- Use sizeof() everywhere, and the macro for the initializer. pros: - It is valid as long as the buffer is an array. cons: - If the code gets into a function, and the buffer is then a pointer, it will definitively produce a

Re: Expose 'array_length()' macro in or

2020-09-30 Thread Alejandro Colomar
On 2020-09-30 17:58, Joseph Myers wrote: For some reason http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2529.pdf doesn't seem to have reached the agenda of a WG14 meeting yet, but adding a language feature like that to the standard would be another approach. Hi Joseph, Yes, that would

Ping: Re: [PATCH v4] : Add nitems()

2020-10-11 Thread Alejandro Colomar
Ping. On 2020-09-28 21:12, Alejandro Colomar wrote: 'nitems()' calculates the length of an array in number of items. It is safe: if a pointer is passed to the macro (or function, in C++), the compilation is broken due to: - In >= C11: _Static_assert() - In C89, C99: Negative anonym

Re: [GIT] Networking

2020-09-12 Thread Alejandro Colomar
---------- Please CC me in any response to this thread. From b5b674d39b28e703300698fa63e4ab4be646df8f Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sun, 5 Apr 2020 01:45:35 +0200 Subject: [PATCH 1/2] linux/kernel.h: add AR

Re: AW: AW: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-14 Thread Alejandro Colomar
Hi Walter, On 9/14/20 11:24 AM, Walter Harms wrote: > missunderstanding, > i do not want to discuss sizeof() vs define I did understand, that was point (3). > > in this example you do: > #define BUFLEN 4096 > char buf[BUFLEN]; > getgrent_r(, buf, sizeof(buf), ); > > so there is no real need

[PATCH 00/24] Many patches

2020-09-10 Thread Alejandro Colomar
Hi Michael, I have a lot of patches here. Some of them are trivial, and some of them are not. I have them sorted by their contents more or less, but if you prefer completely unrelated email threads for completely unrelated patches, please tell me. Cheers, Alex Alejandro Colomar (24

[PATCH 02/24] endian.3: Use 'PRIx32' rather than "%x" when printing 'uint32_t' values

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/endian.3 | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/man3/endian.3 b/man3/endian.3 index bdf1efd7e..3a898bb02 100644 --- a/man3/endian.3 +++ b/man3/endian.3 @@ -147,6 +147,7 @@ htobe32(x.u32) = 0x11223344 \& .EX #inc

[PATCH 01/24] inet_net_pton.3: Use 'PRIx32' rather than "%x" when printing 'uint32_t' values

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/inet_net_pton.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/inet_net_pton.3 b/man3/inet_net_pton.3 index 00f94b9d4..d74a33d74 100644 --- a/man3/inet_net_pton.3 +++ b/man3/inet_net_pton.3 @@ -332,6 +332,7 @@ Raw address

[PATCH 10/24] ioctl_ns.2: Remove unneeded cast

2020-09-10 Thread Alejandro Colomar
Both major(3) and minor(3) return an 'unsigned int', so there is no need to use a 'long' for printing. Moreover, it should have been 'unsigned long', as "%lx" expects an unsigned type. Signed-off-by: Alejandro Colomar --- man2/ioctl_ns.2 | 10 -- 1 file changed, 4 insert

[PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/getgrent_r.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/getgrent_r.3 b/man3/getgrent_r.3 index 81d81a851..76deec370 100644 --- a/man3/getgrent_r.3 +++ b/man3/getgrent_r.3 @@ -186,7 +186,7 @@ main(void) setgrent

[PATCH 05/24] offsetof.3: Use "%zu" rather than "%zd" when printing 'size_t' values

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/offsetof.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/offsetof.3 b/man3/offsetof.3 index 05fdd6dd8..f0c9975f4 100644 --- a/man3/offsetof.3 +++ b/man3/offsetof.3 @@ -93,10 +93,10 @@ main(void) /* Output is compiler

[PATCH 04/24] eventfd.2: Use 'PRIxN' macros when printing C99 fixed-width integer types

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man2/eventfd.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man2/eventfd.2 b/man2/eventfd.2 index 929234ab7..71e9d85b4 100644 --- a/man2/eventfd.2 +++ b/man2/eventfd.2 @@ -386,6 +386,7 @@ Parent read 28 (0x1c) from efd .EX

[PATCH 13/24] getpwent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/getpwent_r.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3 index 64f27dbfb..0f7581091 100644 --- a/man3/getpwent_r.3 +++ b/man3/getpwent_r.3 @@ -190,7 +190,7 @@ main(void) setpwent

[PATCH 21/24] aio.7: Use perror() directly

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man7/aio.7 | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/man7/aio.7 b/man7/aio.7 index ff099885e..9b2c44c48 100644 --- a/man7/aio.7 +++ b/man7/aio.7 @@ -257,8 +257,6 @@ aio_return(): #define errExit(msg) do { perror(msg); exit

[PATCH 14/24] fread.3: Move ARRAY_SIZE logic into macro

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/fread.3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man3/fread.3 b/man3/fread.3 index 4c5dc3dbc..8e71e620e 100644 --- a/man3/fread.3 +++ b/man3/fread.3 @@ -136,6 +136,8 @@ Class: 0x02 #include #include +#define

[PATCH 22/24] membarrier.2: Note that glibc does not provide a wrapper

2020-09-10 Thread Alejandro Colomar
Notes: I copied .nf and .fi from futex.2, but they made no visual difference. What do they actually do? Signed-off-by: Alejandro Colomar --- man2/membarrier.2 | 9 + 1 file changed, 9 insertions(+) diff --git a/man2/membarrier.2 b/man2/membarrier.2 index 8825de71e..f65c6be5c 100644

[PATCH 15/24] unix.7: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man7/unix.7 | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/man7/unix.7 b/man7/unix.7 index f61b51424..50828a5bc 100644 --- a/man7/unix.7 +++ b/man7/unix.7 @@ -991,7 +991,7 @@ main(int argc, char *argv

[PATCH 19/24] pthread_setname_np.3: ffix

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/pthread_setname_np.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man3/pthread_setname_np.3 b/man3/pthread_setname_np.3 index b206f66c0..4dc4960cd 100644 --- a/man3/pthread_setname_np.3 +++ b/man3/pthread_setname_np.3

[PATCH 23/24] select_tut.2: Use MAX(a, b) from

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man2/select_tut.2 | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/man2/select_tut.2 b/man2/select_tut.2 index f683dd49d..d23683d75 100644 --- a/man2/select_tut.2 +++ b/man2/select_tut.2 @@ -354,6 +354,7 @@ from one TCP port

[PATCH 20/24] loop.4: ffix

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man4/loop.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man4/loop.4 b/man4/loop.4 index 73b23871d..1b5d05666 100644 --- a/man4/loop.4 +++ b/man4/loop.4 @@ -227,7 +227,7 @@ in .IR loop_config.info.lo_flags ; and .IP * -Explicitly

[PATCH 24/24] bpf.2: Add missing headers

2020-09-10 Thread Alejandro Colomar
I added some headers to reduce the number of warnings. I found the needed headers by using grep, but maybe some of them shouldn't be included directly. The example still has many problems to compile. Signed-off-by: Alejandro Colomar --- man2/bpf.2 | 12 1 file changed, 12

[PATCH 17/24] get_phys_pages.3: Write 'long' instead of 'long int'

2020-09-10 Thread Alejandro Colomar
For consistency. Most man pages use 'long' instead of 'long int'. Signed-off-by: Alejandro Colomar --- man3/get_phys_pages.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/get_phys_pages.3 b/man3/get_phys_pages.3 index 4a9177dfd..97ba625b7 100644 --- a/man3

[PATCH 11/24] stat.2: Remove unneeded cast

2020-09-10 Thread Alejandro Colomar
Both major(3) and minor(3) return an 'unsigned int', so there is no need to use a 'long' for printing. Moreover, it should have been 'unsigned long', as "%lx" expects an unsigned type. Signed-off-by: Alejandro Colomar --- man2/stat.2 | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 18/24] core.5: Use adequate type

2020-09-10 Thread Alejandro Colomar
'nread' is of type 'ssize_t' 'tot' adds up different values contained in 'nread', so it should also be 'ssize_t', and not 'int' (which possibly overflows). Signed-off-by: Alejandro Colomar --- man5/core.5 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/man5/core.5 b

[PATCH 09/24] clock_getcpuclockid.3: Remove unneeded cast

2020-09-10 Thread Alejandro Colomar
Member 'tv_nsec' of 'struct timespec' is of type 'long' (see time.h.0p), and therefore, the cast is completely redundant. Signed-off-by: Alejandro Colomar --- man3/clock_getcpuclockid.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/clock_getcpuclockid.3 b/man3

[PATCH 16/24] getpwent_r.3: Declare variables with different types in different lines

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man3/getpwent_r.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3 index 0f7581091..b6c1c281f 100644 --- a/man3/getpwent_r.3 +++ b/man3/getpwent_r.3 @@ -184,7 +184,8 @@ in the stream with all other

[PATCH 03/24] timerfd_create.2: Use 'PRIxN' macros when printing C99 fixed-width integer types

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man2/timerfd_create.2 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/man2/timerfd_create.2 b/man2/timerfd_create.2 index 67a13dba3..90e35d9b5 100644 --- a/man2/timerfd_create.2 +++ b/man2/timerfd_create.2 @@ -624,6 +624,7 @@ a.out 3

[PATCH 08/24] add_key.2: Cast to 'unsigned long' rather than 'long' when printing with "%lx"

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man2/add_key.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man2/add_key.2 b/man2/add_key.2 index bda08c3d2..bbd2d1d03 100644 --- a/man2/add_key.2 +++ b/man2/add_key.2 @@ -262,7 +262,7 @@ main(int argc, char *argv[]) exit

[PATCH 06/24] timer_create.2: Cast to 'unsigned long' rathen than 'long' when printing with "%lx"

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man2/timer_create.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man2/timer_create.2 b/man2/timer_create.2 index e9a8b8503..9c9907739 100644 --- a/man2/timer_create.2 +++ b/man2/timer_create.2 @@ -390,7 +390,7 @@ print_siginfo

[PATCH 07/24] request_key.2: Cast to 'unsigned long' rather than 'long' when printing with "%lx"

2020-09-10 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man2/request_key.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man2/request_key.2 b/man2/request_key.2 index e28c11ded..c14bcb000 100644 --- a/man2/request_key.2 +++ b/man2/request_key.2 @@ -537,7 +537,7 @@ main(int argc, char *argv

Re: [PATCH 19/24] pthread_setname_np.3: ffix

2020-09-11 Thread Alejandro Colomar
On 2020-09-11 09:58, Michael Kerrisk (man-pages) wrote: Hi Alex, On 9/10/20 11:13 PM, Alejandro Colomar wrote: Signed-off-by: Alejandro Colomar --- man3/pthread_setname_np.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) What's the rationale for this patch? Thanks, Michael

Re: [PATCH 23/24] select_tut.2: Use MAX(a, b) from

2020-09-11 Thread Alejandro Colomar
Hi Michael, On 2020-09-11 09:54, Michael Kerrisk (man-pages) wrote: Hi Alex, On 9/10/20 11:13 PM, Alejandro Colomar wrote: Signed-off-by: Alejandro Colomar I'm reluctant to apply this, because MAX() is not a standard macro. I suppose it may not be present on some other UNIX systems. You

[PATCH v2 10/24] ioctl_ns.2: Cast to 'unsigned long' rather than 'long' when printing with "%lx"

2020-09-11 Thread Alejandro Colomar
rom c5f644e798ffc5dec0c73f324a26059568865c68 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Fri, 11 Sep 2020 10:51:26 +0200 Subject: [PATCH v2 10/24] ioctl_ns.2: Cast to 'unsigned long' rather than 'long' when printing with "%lx" From the email conversation: On 2020-09-11 09:24, Michael Kerri

[PATCH v2 11/24] stat.2: Cast to 'unsigned long' rather than 'long' when printing with "%lx"

2020-09-11 Thread Alejandro Colomar
: Alejandro Colomar Date: Fri, 11 Sep 2020 10:52:14 +0200 Subject: [PATCH v2 11/24] stat.2: Cast to 'unsigned long' rather than 'long' when printing with "%lx" From the email conversation: On 2020-09-11 09:24, Michael Kerrisk (man-pages) wrote: > Hi Alex, > > On 9/10/20 11:13 PM, Alej

[PATCH v3 11/24] stat.2: wsfix

2020-09-11 Thread Alejandro Colomar
Hi Michael, On 2020-09-11 11:19, Michael Kerrisk (man-pages) wrote: On 9/11/20 11:16 AM, Alejandro Colomar wrote: Hi Michael, On 2020-09-11 09:25, Michael Kerrisk (man-pages) wrote: See my reply to patch 10/24. As with 10/24, here's the new version. Thanks, Alex. Applied. Cheers

Re: [PATCH 01/24] inet_net_pton.3: Use 'PRIx32' rather than "%x" when printing 'uint32_t' values

2020-09-11 Thread Alejandro Colomar
Hi Michael, On 2020-09-11 11:31, Michael Kerrisk (man-pages) wrote: Hi Alex, On 9/10/20 11:13 PM, Alejandro Colomar wrote: Signed-off-by: Alejandro Colomar --- man3/inet_net_pton.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man3/inet_net_pton.3 b/man3

Re: [PATCH 09/24] clock_getcpuclockid.3: Remove unneeded cast

2020-09-11 Thread Alejandro Colomar
Hi Michael, On 2020-09-11 09:48, Michael Kerrisk (man-pages) wrote: Hi Alex, On 9/10/20 11:13 PM, Alejandro Colomar wrote: Member 'tv_nsec' of 'struct timespec' is of type 'long' (see time.h.0p), and therefore, the cast is completely redundant. Good catch! Patch applied. Cheers, Michael

Re: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-11 Thread Alejandro Colomar
Hi Stefan, On 2020-09-11 16:35, Stefan Puiu wrote: > Hi, > > On Fri, Sep 11, 2020 at 12:15 AM Alejandro Colomar > wrote: >> >> Signed-off-by: Alejandro Colomar >> --- >> man3/getgrent_r.3 | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) &

Re: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-11 Thread Alejandro Colomar
On 2020-09-11 17:28, Alejandro Colomar wrote: Hi Stefan, On 2020-09-11 16:35, Stefan Puiu wrote: > Hi, > > On Fri, Sep 11, 2020 at 12:15 AM Alejandro Colomar > wrote: >> >> Signed-off-by: Alejandro Colomar >> --- >>   man3/getgrent_r.3 | 2 +- &g

Re: AW: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-11 Thread Alejandro Colomar
Hi Walter, On 2020-09-11 14:50, Walter Harms wrote: BUFLEN should be remove completely or stay jm2c wh Sorry that you weren't CC'd in the conversation we are having about it. You can have a look at it here:

Re: AW: [PATCH 17/24] get_phys_pages.3: Write 'long' instead of 'long int'

2020-09-11 Thread Alejandro Colomar
On 2020-09-11 15:07, Walter Harms wrote: sys/sysinfo.h:extern long int get_phys_pages (void) for the real world i would say that long int == long but for the same reason i would say what the include says and stay away from discussions. jm2c, wh I think that the man-pages don't need to

Re: [PATCH 1/2] system_data_types.7: Add 'off_t'

2020-10-27 Thread Alejandro Colomar
On 2020-10-27 14:47, Michael Kerrisk (man-pages) wrote: On 10/27/20 11:23 AM, Alejandro Colomar wrote: Hi Michael, On 2020-10-07 08:53, Michael Kerrisk (man-pages) wrote: On 10/6/20 12:12 AM, Alejandro Colomar wrote: Signed-off-by: Alejandro Colomar Hi Alex, Thanks, patch applied

[PATCH] getcpu.2: Document glibc wrapper instead of kernel syscall

2020-12-30 Thread Alejandro Colomar
ibc/ -type f -name '*.h' \ |xargs pcregrep -Mn "(?s)^[\w\s]*${ret}\s*${syscall}\s*\(.*?;"; glibc/sysdeps/unix/sysv/linux/bits/sched.h:92: extern int getcpu (unsigned int *, unsigned int *) __THROW; Signed-off-by: Alejandro Colomar --- man2/

[PATCH v3] perf_event_open.2: Update man page with recent changes

2020-11-12 Thread Alejandro Colomar
From: Namhyung Kim There are lots of changes as usual. I've tried to fill some missing bits in the man page but it'd be nice if you could take a look and put more info there. Signed-off-by: Namhyung Kim [alx: ffix + tfix] Cowritten-by : Alejandro Colomar Signed-off-by: Alejandro Colomar

[PATCH v4] perf_event_open.2: Update man page with recent changes

2020-11-13 Thread Alejandro Colomar
From: Namhyung Kim There are lots of changes as usual. I've tried to fill some missing bits in the man page but it'd be nice if you could take a look and put more info there. Signed-off-by: Namhyung Kim [alx: ffix + tfix] Cowritten-by : Alejandro Colomar Signed-off-by: Alejandro Colomar

Re: [PATCH 1/2] system_data_types.7: Add 'off_t'

2020-10-27 Thread Alejandro Colomar
Hi Michael, On 2020-10-07 08:53, Michael Kerrisk (man-pages) wrote: On 10/6/20 12:12 AM, Alejandro Colomar wrote: Signed-off-by: Alejandro Colomar Hi Alex, Thanks, patch applied. And I trimmed the "See also" a little. I'd hold off on documenting loff_t and off64_t for the mome

Ping(2): [PATCH v4] : Add nitems()

2020-10-27 Thread Alejandro Colomar
Ping On 2020-09-28 21:12, Alejandro Colomar wrote: 'nitems()' calculates the length of an array in number of items. It is safe: if a pointer is passed to the macro (or function, in C++), the compilation is broken due to: - In >= C11: _Static_assert() - In C89, C99: Negative anonym

[PATCH 1/2] futex.2: srcfix

2020-10-30 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- man2/futex.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man2/futex.2 b/man2/futex.2 index f82602c11..837adbd25 100644 --- a/man2/futex.2 +++ b/man2/futex.2 @@ -25,8 +25,8 @@ futex \- fast user-space locking .SH SYNOPSIS .nf .PP

[PATCH 2/2] futex.2: Use appropriate types

2020-10-30 Thread Alejandro Colomar
. Signed-off-by: Alejandro Colomar --- man2/futex.2 | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/man2/futex.2 b/man2/futex.2 index 837adbd25..73de71623 100644 --- a/man2/futex.2 +++ b/man2/futex.2 @@ -26,12 +26,13 @@ futex \- fast user-space

Re: [PATCH 2/2] futex.2: Use appropriate types

2020-10-30 Thread Alejandro Colomar
-10-30 13:39, Alejandro Colomar wrote: The Linux kernel uses the following: kernel/futex.c:3778: SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val, struct __kernel_timespec __user *, utime, u32 __user *, uaddr2, u32, val3) Since there is no glibc wrapper

[PATCH v4] fs/aio.c: Cosmetic

2020-11-20 Thread Alejandro Colomar
'. - Remove trailing whitespace in comments. This patch does not introduce any actual changes in behavior. Signed-off-by: Alejandro Colomar --- Hi, I rebased the patch on top of the current master, to update it after recent changes to aio.c. Thanks, Alex fs/aio.c | 466

Re: [PATCH v4] fs/aio.c: Cosmetic

2020-11-21 Thread Alejandro Colomar
Hi Randy, Thanks for the review. Next time I'll do it in two parts, as you wished. Thanks, Alex On 11/21/20 2:22 AM, Randy Dunlap wrote: > On 11/20/20 2:06 PM, Alejandro Colomar wrote: >> Changes: >> - Consistently use 'unsigned int', instead of 'unsigned'. >> - Add a blan

[PATCH 4/4] fs/binfmt_elf.c: Cosmetic

2020-11-21 Thread Alejandro Colomar
Non-trivial changes: Invert 'if's to simplify logic. Use 'goto' in conjunction with the above, when appropriate. Signed-off-by: Alejandro Colomar --- fs/binfmt_elf.c | 115 +--- 1 file changed, 59 insertions(+), 56 deletions(-) diff --git a/fs

[PATCH 1/4] fs/anon_inodes.c: Use "%s" + __func__ instead of hardcoding function name

2020-11-21 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- fs/anon_inodes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 89714308c25b..7609d208bb53 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -152,11 +152,11 @@ static int __init

[PATCH 3/4] fs/attr.c, fs/bad_inode.c, fs/binfmt_aout.c, fs/binfmt_elf.c: Cosmetic

2020-11-21 Thread Alejandro Colomar
Slightly non-trivial changes: - Move declarations to the top of function definitions. - Split multiple assignments in a single line to multiple lines with a signle assignment each. Signed-off-by: Alejandro Colomar --- fs/attr.c| 5 ++--- fs/bad_inode.c | 5 +++-- fs/binfmt_aout.c

[PATCH 2/4] fs/anon_inodes.c, fs/attr.c, fs/bad_inode.c, fs/binfmt_aout.c, fs/binfmt_elf.c: Cosmetic

2020-11-21 Thread Alejandro Colomar
(//). Signed-off-by: Alejandro Colomar --- fs/anon_inodes.c | 1 + fs/attr.c| 7 +-- fs/bad_inode.c | 50 +- fs/binfmt_aout.c | 94 +- fs/binfmt_elf.c | 129 --- 5 files changed, 143 insertions

[PATCH 0/4] Cosmetic

2020-11-21 Thread Alejandro Colomar
Hello Alexander, I passed chackpatch.pl to these files, and found many things to fix. I splitted the changes into a few different patches, to make it easier for review. Cheers, Alex Alejandro Colomar (4): fs/anon_inodes.c: Use "%s" + __func__ instead of hardcoding function

[PATCH] lseek.2: SYNOPSIS: Use correct types

2020-11-21 Thread Alejandro Colomar
high, src/linux$ sed -n 322,325p fs/read_write.c SYSCALL_DEFINE3(lseek, unsigned int, fd, off_t, offset, unsigned int, whence) { return ksys_lseek(fd, offset, whence); } Signed-off-by: Alejandro Colomar --- man2/lseek.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

Ping(3): [PATCH v4] : Add nitems()

2020-11-17 Thread Alejandro Colomar
Hi, Do you think the patch is ready, or is there anything else I should do before merging it? Thanks, Alex On 9/28/20 9:12 PM, Alejandro Colomar wrote: > 'nitems()' calculates the length of an array in number of items. > It is safe: if a pointer is passed to the macro (or function

Re: Ping(3): [PATCH v4] : Add nitems()

2020-11-17 Thread Alejandro Colomar
Hi Joseph, On 11/17/20 11:44 PM, Joseph Myers wrote: > I've asked the WG14 reflector why N2529 (and N2530, though that one's not > relevant to this feature) doesn't seem to have made it onto a meeting > agenda yet, when there have been two WG14 meetings since that proposal was > made and a third

Re: Ping(3): [PATCH v4] : Add nitems()

2020-11-18 Thread Alejandro Colomar
On 11/18/20 12:11 AM, Joseph Myers wrote: > On Tue, 17 Nov 2020, Alejandro Colomar via Libc-alpha wrote: > >> Nice! >> Please update me on any feedback you receive. > > Apparently the author is planning new versions of those papers so WG14 > discussion is waitin

[PATCH v2] memfd_secret.2: New page describing memfd_secret() system call

2020-11-16 Thread Alejandro Colomar
From: Mike Rapoport Signed-off-by: Mike Rapoport Cowritten-by: Alejandro Colomar Acked-by: Alejandro Colomar Signed-off-by: Alejandro Colomar --- Hi Mike, I added that note about not having a wrapper, fixed a few minor formatting and wording issues, and sorted ERRORS alphabetically

[PATCH] restart_syscall.2: SYNOPSIS: Fix restart_syscall() return type

2020-11-23 Thread Alejandro Colomar
*ufds; int nfds; int has_timeout; unsigned long tv_sec; unsigned long tv_nsec; } poll; }; }; Signed-off-by: Alejandro Colomar --- man2/restart_syscall.2 | 2 +- 1 file changed, 1 ins

[PATCH] set_tid_address.2: SYNOPSIS: Fix set_tid_address() return type

2020-11-23 Thread Alejandro Colomar
-rn 'task_pid_vnr(struct' linux/ linux/include/linux/sched.h:1374: static inline pid_t task_pid_vnr(struct task_struct *tsk) Signed-off-by: Alejandro Colomar --- man2/set_tid_address.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man2/set_tid_address.2 b/man2/set_tid_address.2 in

[PATCH] spu_create.2: Clarify that one of the prototypes is the current one

2020-11-26 Thread Alejandro Colomar
st char __user *name, 67207b9664a8d (Arnd Bergmann 2005-11-15 15:53:48 -0500 37) unsigned int flags, mode_t mode) $ git describe --contains 8e68e2f248332 v2.6.23-rc1~195^2~7 Signed-off-by: Alejandro Colomar --- man2/spu_create.2 | 16 +--- 1 file changed, 13 insertions(+),

[PATCH] subpage_prot.2: SYNOPSIS: Fix return type: s/long/int/

2020-11-27 Thread Alejandro Colomar
'\'; int err; err = -ENOMEM; err = -ENOMEM; err = 0; return err; Signed-off-by: Alejandro Colomar --- man2/subpage_prot.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man2/subpage_prot.2 b/man2/subpage_prot.2

[PATCH] futex: Change 'utime' parameter to be 'const ... *'

2020-11-28 Thread Alejandro Colomar
const struct __kernel_timespec __user *uts); ... Signed-off-by: Alejandro Colomar --- Hello Thomas & Ingo, I'm sorry I couldn't test the change in my computers, as there is a bug since Linux 5.7 where I can't boot (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=974166). Alex

[PATCH v2] perf_event_open.2: Update man page with recent changes

2020-11-05 Thread Alejandro Colomar
From: Namhyung Kim There are lots of changes as usual. I've tried to fill some missing bits in the man page but it'd be nice if you could take a look and put more info there. Signed-off-by: Namhyung Kim [colomar.6@gmail.com: ffix + tfix] Co-developed-by : Alejandro Colomar Signed-off

Multiple definitions of ARRAY_SIZE(arr)

2020-09-06 Thread Alejandro Colomar
Hi all, I was reading through kernel code, and found that there are many definitions of `ARRAY_SIZE(arr)` all around the kernel. Is there a reason for all of those to exist, or should they all just include ? If so, I would be happy to patch them. Moreover, only the one is safe because of

Re: Multiple definitions of ARRAY_SIZE(arr)

2020-09-06 Thread Alejandro Colomar
Hi all, Here are a few more I could find using: $ grep -rn "\/" | grep "sizeof.*sizeof" | grep -v ARRAY_SIZE | \ grep define | grep "\[0\]\|\*" drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:449:#define ARRAY_LEN(arr) ((int)((int)sizeof(arr) / (int)sizeof(arr[0])))

Re: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-24 Thread Alejandro Colomar
Hi, On 2020-09-23 22:35, Michael Kerrisk (man-pages) wrote: On 9/15/20 12:03 PM, Stefan Puiu wrote: Hi, On Fri, Sep 11, 2020 at 6:28 PM Alejandro Colomar wrote: Hi Stefan, On 2020-09-11 16:35, Stefan Puiu wrote: > Hi, > > On Fri, Sep 11, 2020 at 12:15 AM Alejandro Colomar

Re: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-24 Thread Alejandro Colomar
solution 1). Just so I can refresh my cache, which commits were those? * b9bf90297 - Thu, 10 Sep 2020 23:13:36 +0200 (2 weeks ago) | unix.7: Use sizeof() to get buffer size (instead of hardcoding macro name) - Alejandro Colomar [...] * 1656c1702 - Thu, 10 Sep 2020 23:13:34 +0200 (2

Re: [PATCH 12/24] getgrent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name)

2020-09-24 Thread Alejandro Colomar
Hi Michael, On 2020-09-24 13:38, Michael Kerrisk (man-pages) wrote: > On 9/24/20 11:35 AM, Alejandro Colomar wrote: >> Hi, >> >> On 2020-09-23 22:35, Michael Kerrisk (man-pages) wrote: >>> On 9/15/20 12:03 PM, Stefan Puiu wrote: >>>> Hi, >>&

Re: [PATCH] man2: new page describing memfd_secret() system call

2020-09-24 Thread Alejandro Colomar
* Mike Rapoport: > +.PP > +.IR Note : > +There is no glibc wrapper for this system call; see NOTES. You added a reference to NOTES, but then in notes there is nothing about it. I guess you wanted to add the following to NOTES (taken from membarrier.2): .PP Glibc does not provide a wrapper

Re: [PATCH] getdents.2: Use 'ssize_t' instead of 'int'

2020-10-29 Thread Alejandro Colomar
[[ CC += linux-kernel, libc-alpha ]] Hi Michael, On 2020-10-29 08:13, Michael Kerrisk (man-pages) wrote: > Hi Alex, > > On 10/28/20 11:11 PM, Alejandro Colomar wrote: >> The glibc wrapper for getdents64() uses ssize_t. > > It also changed the types for the arguments, so tho

  1   2   3   >