ENUM P9_OPEN_MODE_T(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 an exec(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