VOP_PATHCONF(9)
π« VOP_PATHCONF(9) π«
okay so bestie, welcome to the VOP_PATHCONF page β it's a kernel developer's manual entry (section 9, yep, the kernel-functions one) and it's literally all about one thing: getting the POSIX pathconf info for a vnode. it's giving "small function, big responsibility" energy and honestly? we stan. π
β¨ SYNOPSIS β¨
first things first, the includes β copy them exactly, no ad-libbing:
#include <sys/param.h>
#include <sys/vnode.h>
#include <sys/unistd.h>
int
VOP_PATHCONF(struct vnode *vp, int name, long *retval);
like, the whole vibe is: you hand it a vnode, you tell it what info you want, and it drops the answer into *retval. slay. π
πΈ DESCRIPTION πΈ
okay so here are the arguments, one by one, no skipping:
vpβ the vnode you want info about. it's the main character here, lowkey.nameβ the type of information you want back. it's a selector, it's picking the vibe.retvalβ the place where the info gets returned. the drop-off spot. π«Ά
so when the function runs, the value of name is what decides what comes back. here's the full menu, iykyk:
_PC_LINK_MAXβ the maximum number of links to a file._PC_NAME_MAXβ the maximum number of bytes in a file name._PC_PATH_MAXβ the maximum number of bytes in a pathname._PC_PIPE_BUFβ the maximum number of bytes which will be written atomically to a pipe._PC_CHOWN_RESTRICTEDβ return1if appropriate privileges are required for thechown(2)system call, otherwise0._PC_NO_TRUNCβ return1if file names longer thanKERN_NAME_MAXare truncated.
periodt. that's the whole list, we didn't leave a single one out. π
π LOCKS π
important!! the vnode will be locked on entry and it should remain locked on return. do not come in here unlocking things, bestie, that's not the move. π«π
π¦ RETURN VALUES π¦
so here's how it goes:
- if
nameis recognized β*retvalgets set to the specified value and zero is returned β¨ - otherwise β
EINVALis returned π
that's it, that's the whole contract. no cap.
π SEE ALSO π
go read those if you want the bigger picture, bestie. π§
π AUTHORS π
this manual page was written by Doug Rabson. giving credit where credit is due, love that for him. π
and that's a wrap!! this page came from the Debian crew, dated December 31, 2020 β so like, it's a little vintage but it's still iconic. new year's eve manpage, actually kind of a serve. πβπ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1996 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms