p9mode2perm(9)
π p9mode2perm(9) π
okay so real talk, this is a page straight out of the Kernel API Manual, and the star of the show is p9mode2perm β the little icon that converts plan9 mode bits into unix permission bits. it's giving translator, it's giving bilingual queen, no cap β¨
πΈ NAME πΈ
p9mode2perm β convert plan9 mode bits to unix permission bits π«Ά
β¨ SYNOPSIS β¨
int p9mode2perm (struct v9fs_session_info *v9ses , struct p9_wstat *stat
);
π ARGUMENTS π
v9sesβ the v9fs session information, aka the whole vibe context of your session πstatβ thep9_wstatyou're pulling the mode out of; this is literally where the mode need to be derived from π
π¦ SEE ALSO π¦
bestie, the rabbit hole is deep and honestly kind of iconic. pull up the kernel file ./fs/9p/vfs_inode.c and then go meet the whole friend group:
unixmode2p9mode(9)π«p9mode2unixmode(9)π«v9fs_uflags2omode(9)π«v9fs_blank_wstat(9)π«v9fs_alloc_inode(9)π«v9fs_free_inode(9)π«v9fs_evict_inode(9)π«v9fs_at_to_dotl_flags(9)π«v9fs_dec_count(9)π«v9fs_remove(9)π«v9fs_create(9)π«v9fs_vfs_create(9)π«v9fs_vfs_mkdir(9)π«v9fs_vfs_lookup(9)π«v9fs_vfs_unlink(9)π«v9fs_vfs_rmdir(9)π«v9fs_vfs_rename(9)π«v9fs_vfs_getattr(9)π«v9fs_vfs_setattr(9)π«v9fs_stat2inode(9)π«v9fs_vfs_get_link(9)π«v9fs_vfs_mkspecial(9)π«v9fs_vfs_symlink(9)π«v9fs_vfs_link(9)π«v9fs_vfs_mknod(9)π«
likeβ¦ that's the whole roster π everyone's here, everyone ate π₯
ngl there's no OPTIONS section and no exit statuses on this one β it's just a clean little conversion function living its best life in ./fs/9p. no drama, no bugs listed, just vibes π
mwah, that's a wrap π§π
β this page lives in ./fs/9p, dated October 2026, and it goes by p9mode2perm(9) if you need to find it again. slay & goodbye ππβ
π¦ 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