Skip to content

landlock.7: Code example improvements

Günther Noack linux-man 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4landlock.7: Check syscall result with == -1 instead of <= 0man7/landlock.7+1 -10 replies
2/4landlock.7: Use LANDLOCK_* constants for compatibility tableman7/landlock.7+3 -30 replies
3/4landlock.7: wfix: Error message wording in code exampleman7/landlock.7+1 -10 replies
4/4landlock.7: Return instead of exit() if Landlock is unusableman7/landlock.7+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] landlock.7: Code example improvements

Various improvements as pointed out by Mickaël Salaün in
https://lore.kernel.org/linux-man/[email protected]/

* Checking system call results differently, for consistency
* Use constants for the compatibility table
(I'm not very attached to the other solution)
* Better wording for error message if Landlock unusable
* Return instead of exit() if Landlock unusable

Regarding the EOPNOTSUPP/ENOTSUP discussion, the consensus seems to be that EOPNOTSUPP is preferable, because that is the only of the two error codes that the kernel knows about.

Günther Noack (4):
landlock.7: Check syscall result with == -1 instead of <= 0 landlock.7: Use LANDLOCK_* constants for compatibility table landlock.7: wfix: Error message wording in code example landlock.7: Return instead of exit() if Landlock is unusable

 man7/landlock.7 | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

base-commit: 6693a21cf73c502f2429b4ec07698130a2be9a93

Signature · 1 line
2.40.0