sys_name_to_handle_at(9)
π sys_name_to_handle_at(9) π
okay bestie, buckle up, because we're diving into the Kernel API Manual β¨ this one is literally called sys_name_to_handle_at and it's about turning a name into a handle. iykyk π
πΈ NAME πΈ
sys_name_to_handle_at β convert name to handle π
no cap, that's the whole vibe. a name goes in, a handle comes out.
β¨ SYNOPSIS β¨
long sys_name_to_handle_at (int dfd , const char __user * name , struct
file_handle __user * handle , void __user * mnt_id , int flag );
look at that signature, she's gorgeous π«Ά five arguments, all iconic.
π¦ ARGUMENTS π¦
dfdβ the directory thatnameis interpreted relative to, ifnameisn't absolute. like, the home base of the whole operation πnameβ the name that should be converted to a handle. the main character of this function tbh πhandleβ the resulting file handle. this is where the magic lands β¨mnt_idβ the mount id of the file system containing the file. heads up: it's au64ifAT_HANDLE_MNT_ID_UNIQUEis in play, otherwise it's anintπ§ so like, mind your types, bestieflagβ the flag value that indicates whether to follow the symlink or not, and whether a decodable file handle is required π₯
π DESCRIPTION π
okay so here's the tea π on how the size thing works:
handle->handle_size indicates the space available to store the variable part of the file handle, measured in bytes. that's the space you've got to work with, periodt.
β¨ and if there is not enough space? the field gets updated to return the minimum value required. so she tells you exactly how much room she needs, which is honestly so considerate of her ππ
π SEE ALSO π
- Kernel file
./fs/fhandle.c sys_open_by_handle_at(9)
so yeah, that's the whole thing, bestie π go forth and handle responsibly π
β¨π slay πβ¨ β this little love letter came from the ./fs source, October 2026 version, and it's filed under sys_name_to_handle_at(9) π¦π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms