ENUM P9_OPEN_MODE_T(9)
πΈ ENUM P9_OPEN_MODE_T(9) πΈ
okay so bestie, welcome to the Kernel API Manual page for enum p9_open_mode_t β it's the 9P open modes, and it's genuinely so much cuter than it sounds, i promise π«Ά
β¨ NAME β¨
enum p9_open_mode_t β the 9P open modes π
π¦ SYNOPSIS π¦
enum p9_open_mode_t {
P9_OREAD ,
P9_OWRITE ,
P9_ORDWR ,
P9_OEXEC ,
P9_OTRUNC ,
P9_OREXEC ,
P9_ORCLOSE ,
P9_OAPPEND ,
P9_OEXCL ,
P9L_MODE_MASK ,
P9L_DIRECT ,
P9L_NOWRITECACHE ,
P9L_LOOSE
};
like, that's the whole squad right there β
π Constants π
P9_OREADβ open the file for reading only πP9_OWRITEβ open the file for writing only βοΈP9_ORDWRβ open the file for reading or writing, flexible icon energy π₯P9_OEXECβ open the file for execution πββοΈP9_OTRUNCβ truncate the file to zero-length before opening it, so it's giving fresh start πP9_OREXECβ close the file when anexec(2)system call is made π«ΆP9_ORCLOSEβ remove the file when the file is closed, lowkey dramatic πP9_OAPPENDβ open the file and seek to the end πP9_OEXCLβ only create a file, do not open it, boundaries periodt βP9L_MODE_MASKβ mask for protocol mode bits (client-side only) πP9L_DIRECTβ disable client-side caching for this file, no cap π«P9L_NOWRITECACHEβ disable write caching for this file πP9L_LOOSEβ enable loose cache consistency π§
π Description π
so here's the tea β β 9P open modes differ slightly from the Posix standard modes. not a huge deal, just a lil vibe check that didn't fully match π
in particular, there are extra modes which specify different semantic behaviors than may be available on standard Posix systems. for example, P9_OREXEC and P9_ORCLOSE are modes that most likely will not be issued from the Linux VFS client, but may be supported by servers π₯οΈβ¨
See Also: http://plan9.bell-labs.com/magic/man2html/2/open π
π SEE ALSO π
- Kernel file
./include/net/9p/9p.h enum p9_debug_flags(9)enum p9_msg_t(9)enum p9_perm_t(9)enum p9_qid_t(9)struct p9_qid(9)struct p9_wstat(9)struct p9_iattr_dotl(9)struct p9_fcall(9)
bestie disclaimer π β the semantic caveats are real, so don't go assuming these all behave exactly like your fave Posix flags, mwah π
and that's the whole page, you ate that π sign-off time: this lil masterpiece lives in ./include/net/9p, dated October 2026, and it's enum p9_open_mode_t(9) β iconic, no notes ππ
π¦ 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