sysdecode_fcntl_arg(3)
β¨ 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βargtype:int. Output format:"FD_CLOEXEC","FD_CLOFORK", or the value ofargin the indicated base (one of8,10, or16).F_SETFLβargtype:int. Output format: file flags as output bysysdecode_fcntl_fileflags(3), with any unknown or remaining bits output in hexadecimal.F_GETLK,F_SETLK,F_SETLKWβargtype:struct flock *. Output format: the value ofargusing the"%p"conversion specification.- Others β
argtype:int. Output format: the value ofargin the indicated base (one of8,10, or16).
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
- Copyright (c) 2016 John Baldwin <jhb@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms