sysdecode_fcntl_arg(3)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

✨ sysdecode_fcntl_arg(3) β€” Library Functions Manual, but make it cute ✨

okay so bestie, welcome to the sysdecode_fcntl_arg(3) page β€” it's part of the Library Functions Manual, and it's all about describing that optional fcntl(2) argument. niche? yes. iconic? also yes. πŸ’…

πŸŽ€ NAME πŸŽ€

sysdecode_fcntl_arg, sysdecode_fcntl_arg_p β€” output description of fcntl argument

🫢 LIBRARY 🫢

library libsysdecode

🌸 SYNOPSIS 🌸

#include <sysdecode.h>

void
sysdecode_fcntl_arg(FILE *fp, int cmd, uintptr_t arg, int base);

bool
sysdecode_fcntl_arg_p(int cmd);

πŸ’… DESCRIPTION πŸ’…

okay so sysdecode_fcntl_arg() is the main character here: it takes the optional arg argument to fcntl(2) and outputs a text description of it to the stream fp. The type of arg and the format it gets printed in are determined by cmd β€” literally, cmd decides the whole vibe:

  • F_SETFD β€” arg type: int. Output format: "FD_CLOEXEC", "FD_CLOFORK", or the value of arg in the indicated base (one of 8, 10, or 16).
  • F_SETFL β€” arg type: int. Output format: file flags as output by sysdecode_fcntl_fileflags(3), with any unknown or remaining bits output in hexadecimal.
  • F_GETLK, F_SETLK, F_SETLKW β€” arg type: struct flock *. Output format: the value of arg using the "%p" conversion specification.
  • Others β€” arg type: int. Output format: the value of arg in the indicated base (one of 8, 10, or 16).

and then there's sysdecode_fcntl_arg_p() β€” the vibe-check function. use it to determine if a fcntl(2) command uses the optional third argument to fcntl(2). it returns true if cmd accepts a third argument to fcntl(2) and false if it does not. periodt. πŸ’–

πŸ’– RETURN VALUES πŸ’–

sysdecode_fcntl_arg_p returns true if cmd accepts a third argument to fcntl(2) and false if it does not. that's the whole return-value story, bestie β€” no extra plot twists. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’– that's the whole page, bestie. this one is sysdecode_fcntl_arg(3), from Debian, dated November 24, 2017. go decode and slay. πŸ’…βœ¨

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms