summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
* unix.7: Build example programsAlejandro Colomar2024-03-12-2/+12
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* read.2: tfixHugo Gabriel Eyherabide2024-03-12-1/+1
| | | | | Signed-off-by: Hugo Gabriel Eyherabide <hugogabiel.eyherabide@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* log2.3, log10.3: wfixAlejandro Colomar2024-03-12-4/+4
| | | | | Reported-by: Morten Welinder <mwelinder@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* cbrt.3: wfix: Cube roots are rarely representableAlejandro Colomar2024-03-12-2/+5
| | | | | | | | | | | | | | On Thu, Feb 29, 2024 at 07:28:10PM -0500, Morten Welinder wrote: > The phrase "every representable real value has a representable real > cube root" is wrong. In fact, a representable cube root is quite > rare. Link: <https://lore.kernel.org/linux-man/ZeYKUOKYS7G90SaV@debian/T/#mff0ab388000c6afdb5e5162804d4a0073de481de> Reported-by: Morten Welinder <mwelinder@gmail.com> Cowritten-by: Morten Welinder <mwelinder@gmail.com> Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> Cc: Vincent Lefevre <vincent@vinc17.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* significand.3: significand() uses FLT_RADIX, not 2Alejandro Colomar2024-03-12-1/+2
| | | | | | | It's implemented using scalb(), which uses FLT_RADIX. Reported-by: Morten Welinder <mwelinder@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* logb.3: logb(x) is floor(log2(fabs(x)))Alejandro Colomar2024-03-12-1/+1
| | | | | | | | | | | log2(3) doesn't accept negative input, but it seems logb(3) does accept it. Link: <https://lore.kernel.org/linux-man/ZeYKUOKYS7G90SaV@debian/T/#u> Reported-by: Morten Welinder <mwelinder@gmail.com> Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> Cc: Vincent Lefevre <vincent@vinc17.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: dist: Don't package .git/Alejandro Colomar2024-03-10-0/+1
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* clock_getres.2: HISTORY: Clarify that POSIX.1-2008 only makes mandatory the ↵Alejandro Colomar2024-03-05-1/+2
| | | | | | | | | | | functions The different clocks are still optional. Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=218452> Fixes: 4131356cdab8 ("man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections") Reported-by: Enrique Garcia <cquike@arcor.de> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* cgroups.7: tfixAlejandro Colomar2024-03-05-2/+2
| | | | | | Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=218105> Reported-by: Göran Uddeborg <goeran@uddeborg.se> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: Add missing includeAlejandro Colomar2024-03-05-0/+1
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* clock_nanosleep.2: Use 't' rather than 'request'Alejandro Colomar2024-03-05-8/+8
| | | | | | | | | It seems much more clear. Cc: Elliott Hughes <enh@google.com> Cc: Stefan Puiu <stefan.puiu@gmail.com> Cc: Bruno Haible <bruno@clisp.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* nanosleep.2: Use 'duration' rather than 'request'Alejandro Colomar2024-03-03-7/+8
| | | | | | | | | It seems much more clear. Suggested-by: Elliott Hughes <enh@google.com> Cc: Stefan Puiu <stefan.puiu@gmail.com> Cc: Bruno Haible <bruno@clisp.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* man*/: epoll_*(), fcntl(), flock(), ioctl(), msgctl(), *prctl(), ptrace(), ↵Alejandro Colomar2024-03-03-209/+217
| | | | | | | | | quotactl(), reboot(), semctl(), shmctl(), lockf(): Consistently use 'op' and 'operation' Reported-by: Bruno Haible <bruno@clisp.org> Cc: Elliott Hughes <enh@google.com> Cc: Stefan Puiu <stefan.puiu@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* Changes.old: tfixJakub Wilk2024-02-28-1/+1
| | | | | Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: distcheck: Rewrite most of itAlejandro Colomar2024-02-28-240/+18
| | | | | | This implementation is simpler. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: build-ex-src: Support long $DISTNAMEAlejandro Colomar2024-02-28-0/+2
| | | | | | | | When $DISTNAME is too long, mandoc(1) breaks the last line. The last two lines can always be removed safely, which makes it work also in this case. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: Fix pathAlejandro Colomar2024-02-28-1/+1
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* process_madvise.2: Fix comments about commit idsAlejandro Colomar2024-02-28-1/+2
| | | | | | | | | | | | | Move the comment about the Linux commit id, specify that it's a Linux commit, and add the glibc commit id too. Link: <https://sourceware.org/bugzilla/show_bug.cgi?id=27380> Link: <https://lore.kernel.org/linux-man/Zd5fMGvIlmhQyONs@thunder.hadrons.org/T/#m9129640e1293a94ff1606a2f973522f40c968306> Fixes: 28628d826661 ("process_madvise.2: Document the glibc wrapper") Reported-by: Guillem Jover <guillem@hadrons.org> Cc: Florian Weimer <fweimer@redhat.com> Cc: Carlos O'Donell <carlos@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* CONTRIBUTING.d/lint: Rewrite now that we have $SKIP_XFAILAlejandro Colomar2024-02-26-27/+27
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/, man*/: build-ex: Skip expected failuresAlejandro Colomar2024-02-26-9/+63
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* etc/cppcheck/cppcheck.suppress: Silence reportAlejandro Colomar2024-02-26-0/+1
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/, etc/: Fix dependenciesAlejandro Colomar2024-02-26-6/+6
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: lint-c: Skip expected failuresAlejandro Colomar2024-02-26-23/+330
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* man3/: Say cancelation instead of cancellationAlejandro Colomar2024-02-26-7/+7
| | | | | | It's the most common spelling in this project. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: $SKIP_XFAIL: Add variable to allow skipping expected failuresAlejandro Colomar2024-02-26-298/+184
| | | | | | Default to 'yes'. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: distcheck: string_copying.7 fails 'check-catman'Alejandro Colomar2024-02-26-0/+1
| | | | | | Except with groff(1) from git HEAD, which will be 1.24.0 eventually. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* mbsrtowcs.3: ffixAlejandro Colomar2024-02-26-1/+2
| | | | | | | With groff-1.23.0, which has a base paragraph indentation of 7, this line was longer than 80 columns. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/configure/version.mk: $DISTDATECMD: Use committer date, not author dateAlejandro Colomar2024-02-26-1/+1
| | | | | | | Comitter date is always increasing, while author date may jump backwards, which is problematic with make(1). Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: Simplify codeAlejandro Colomar2024-02-26-3/+4
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: distcheck: Ignore fanotify_init.2 build errorsAlejandro Colomar2024-02-25-0/+6
| | | | | | | | | In groff from git HEAD, it doesn't fail, but in 1.23.0, which still has the default base paragraph indentation set to 7, it reports troff:man2/fanotify_init.2:322: warning [p 4, 0.7i]: cannot adjust line Signed-off-by: Alejandro Colomar <alx@kernel.org>
* man*/: srcfixAlejandro Colomar2024-02-25-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | Found with: $ grep -rn '"""' man* \ | grep -v '"""""""""""' \ | sed 's/:.*//' \ | sort \ | uniq; man2/add_key.2 man2/getrlimit.2 man2/keyctl.2 man2/pivot_root.2 man2/request_key.2 man3/isalpha.3 man3/setlocale.3 man3/toupper.3 man7/capabilities.7 man7/cgroups.7 man7/keyrings.7 man7/locale.7 man7/user_namespaces.7 Signed-off-by: Alejandro Colomar <alx@kernel.org>
* man*/: ffixAlejandro Colomar2024-02-25-7/+7
| | | | | | | | | | | | | | | | Found with: $ grep -rn '^\.[BI] .* [.,:;)]*$' man* man2/prctl.2:382:.B FR=1 . man2/openat2.2:377:.B EAGAIN . man2/openat2.2:424:.I how.resolve . man5/elf.5:788:.B PF_R . man5/networks.5:18:.I name number aliases ... man5/protocols.5:31:.I protocol number aliases ... man7/cgroups.7:980:.I """max""" . Cc: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: distcheck-*: Add targets to run 'distcheck' partiallyAlejandro Colomar2024-02-25-4/+65
| | | | | | | | This is mainly for debugging purposes. I won't document it in 'make help' for now, as it will clutter the output, and isn't so useful for normal users. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* vsock.7: ffixнаб2024-02-25-1/+1
| | | | | Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* process_madvise.2: Rename parameter, and use array syntaxAlejandro Colomar2024-02-25-7/+7
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* process_madvise.2: Document the glibc wrapperAlejandro Colomar2024-02-25-15/+5
| | | | | | | | | | | | | $ grepc -n process_madvise /usr/include/ /usr/include/x86_64-linux-gnu/bits/mman_ext.h:25: extern __ssize_t process_madvise (int __pid_fd, const struct iovec *__iov, size_t __count, int __advice, unsigned __flags) __THROW; Reported-by: Florian Weimer <fweimer@redhat.com> Cc: Carlos O'Donell <carlos@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* sigaction.2: HISTORY: Some constants are or were XSI extensionsAlejandro Colomar2024-02-25-1/+9
| | | | | | | Link: <https://lore.kernel.org/linux-man/20240214095707.1824c25c@plasteblaster/T/> Reported-by: Thomas Orgis <thomas@orgis.org> Cc: Eric Blake <eblake@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* sigaction.2: HISTORY: SA_NOCLDSTOP wasn't added in POSIX.1-2001Alejandro Colomar2024-02-25-1/+0
| | | | | | | | | It already existed in POSIX.1-1996, according to just a few lines above. Link: <https://lore.kernel.org/linux-man/20240214095707.1824c25c@plasteblaster/T/> Cc: Thomas Orgis <thomas@orgis.org> Cc: Eric Blake <eblake@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* getdents.2: Add note to misleading field "d_off" in struct linux_dirent64Vinícius Schütz Piva2024-02-25-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The getdents.2 man page details a pair syscalls: getdents() and getdents64(), both of which are used to get the entries of a directory. The results are populated into a structure, with the difference between both syscalls being mostly bitwidth related. However, the behaviour or the 'd_off' field in both struct linux_dirent and linux_dirent64 is wrongly documented in this man page. According to the current manual page, 'd_off' is used to store the "Offset to the next linux_dirent [...] the distance from the start of the directory to the start of the next linux_dirent." This value, though, is filesystem dependent, and much of the time it stores no such offset. According to readdir.3 [1] manpage: > The value returned in d_off is the same as would be returned by > calling telldir(3) at the current position in the directory stream. > Be aware that despite its type and name, the d_off field is seldom > any kind of directory offset on modern filesystems. Applications > should treat this field as an opaque value, making no assumptions > about its contents; see also telldir(3). Of course, readdir(3) is a glibc function with no ties to getdents(2), but it was implemented with such syscall and considering that readdir(3) doesn't process the data from getdents(2) my belief is that it inherited said behaviour from it [2]. telldir(3) tells a similar story. On the example provided at the end of getdents.2, notable is the d_off value of the very last entry: --------------- nread=120 --------------- inode# file type d_reclen d_off d_name 2 directory 16 12 . 2 directory 16 24 .. 11 directory 24 44 lost+found 12 regular 16 56 a 228929 directory 16 68 sub 16353 directory 16 80 sub2 130817 directory 16 4096 sub3 which makes a very sudden jump that is obviously not where the entry is located. Rerunning this same example but on a ext4 partition gives you garbage values: --------------- nread=176 --------------- inode# file type d_reclen d_off d_name 2050 directory 24 4842312636391754590 sub2 2 directory 24 4844777444668968292 .. 2051 directory 24 7251781863886579875 sub3 12 regular 24 7470722685224223838 a 2049 directory 24 7653193867028490235 sub 11 directory 32 7925945214358802294 lost+found 2 directory 24 9223372036854775807 . In fact, I've had a hard time reproducing nice d_off values on ext2 too, so what the filesystem does with d_off must have change since then. On tmpfs it's a count: --------------- nread=144 --------------- inode# file type d_reclen d_off d_name 1 directory 24 1 . 1 directory 24 2 .. 5 directory 24 3 sub3 4 directory 24 4 sub2 3 directory 24 5 sub 2 regular 24 6 a I've also not been the first to notice this, as you can see from this stackoverflow issue opened last year: https://stackoverflow.com/q/75119224 Safe to say, it's a very unreliable field. Below is a patch that adds a warning besides the d_off field in both structures, plus a brief explanation on why this field can be mislea- ding (while also directing the user towards the readdir.3 man page). Link: [1] <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/man3/readdir.3> Link: [2] <https://elixir.bootlin.com/glibc/glibc-2.39/source/sysdeps/unix/sysv/linux/readdir.c> Signed-off-by: Vinícius Schütz Piva <vinicius.vsczpv@outlook.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: srcfixAlejandro Colomar2024-02-25-48/+65
| | | | | | | Use a variable for the options passed to recursive make(1), to avoid repetition. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: dist: Show CP instead of INSTALLAlejandro Colomar2024-02-25-1/+1
| | | | | | | We're using install(1), but it's just an implementation detail. Since we're not installing into the system, CP is less confusing. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: dist: FORCE regeneration of version file if necessaryAlejandro Colomar2024-02-25-1/+18
| | | | | | | | | | | If any of $DISTVERSION, $DISTNAME, or $DISTDATE have changed since the last 'make dist', force regeneration of the version file, even if it wouldn't change due to normal dependencies. This makes sure that the tarball has correct values. It doesn't need to depend on all $DISTFILES. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: $DISTDATE: If the repository is "dirty", use the newest timestampAlejandro Colomar2024-02-25-9/+26
| | | | | | | | Otherwise, the files within the 'dist' tarball will have a timestamp older than their last actual modification, which is problematic with 'distcheck'. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: dist: Preserve links with cp(1)Alejandro Colomar2024-02-25-1/+1
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: Consistently use 'cp -T'Alejandro Colomar2024-02-25-1/+1
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/configure/version.mk: $DISTNAME: Pass --dirty to git-describe(1)Alejandro Colomar2024-02-25-1/+1
| | | | | | | This makes sure we don't accidentally produce release tarballs from a dirty repository. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/configure/version.mk: $DISTNAME: Don't hide git(1) errorsAlejandro Colomar2024-02-25-1/+1
| | | | | | | | We don't call git(1) inside tarballs anymore to get the $DISTNAME, so we can safely assume that git(1) should never fail, and if it fails, we better get an error message. Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: distcheck: Remove old directory before untarring the new tarballAlejandro Colomar2024-02-25-0/+1
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: distcheck: Fix dependenciesAlejandro Colomar2024-02-25-15/+15
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>
* share/mk/: Fix pathAlejandro Colomar2024-02-25-1/+1
| | | | Signed-off-by: Alejandro Colomar <alx@kernel.org>