STRUCT P9_WSTAT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct p9_wstat(9) β€” like, the whole kernel API manual vibe πŸ¦‹

okay bestie, buckle up β€” this is a page straight out of the Kernel API Manual, and it's all about struct p9_wstat, aka file system metadata information. yes. the ~vibes~ of a file, but make it 9p. πŸ’…


✨ SYNOPSIS ✨

struct p9_wstat {
    u16 size;
    u16 type;
    u32 dev;
    struct p9_qid qid;
    u32 mode;
    u32 atime;
    u32 mtime;
    u64 length;
    const char *name;
    const char *uid;
    const char *gid;
    const char *muid;
    char *extension;
    kuid_t n_uid;
    kgid_t n_gid;
    kuid_t n_muid;
 };

like… look at her. iconic struct. no notes. 🫢


πŸŽ€ Members πŸŽ€

time to meet the cast, one field at a time. every single one of them matters, so no skipping, bestie:

  • size β€” the length prefix for this stat structure instance. she's the little header that says how long the rest is. πŸ’–
  • type β€” the type of the server (equivalent to a major number). lowkey the server's whole genre.
  • dev β€” the sub-type of the server (equivalent to a minor number). the genre's subgenre, iykyk.
  • qid β€” a unique id from the server, of type p9_qid. her little fingerprint. ⭐
  • mode β€” Plan 9 format permissions, of type p9_perm_t. who's allowed to do what, Plan 9 style.
  • atime β€” Last access/read time. when somebody last looked at it. πŸ‘€
  • mtime β€” Last modify/write time. when somebody last touched it. ✍️
  • length β€” file length. how much file is in the file.
  • name β€” last element of path (aka filename). the main character part of the path. πŸ‘‘
  • uid β€” owner name. the name of the one who owns it.
  • gid β€” group owner. the group that owns it.
  • muid β€” last modifier. the one who touched it most recently.
  • extension β€” area used to encode extended UNIX support. the little pocket for extra UNIX-ness. 🧚
  • n_uid β€” numeric user id of owner (part of the 9p2000.u extension). note the .u β€” that's the extension era, bestie. ✨
  • n_gid β€” numeric group id (part of the 9p2000.u extension). same deal.
  • n_muid β€” numeric user id of laster modifier (part of the 9p2000.u extension). yes, "laster" β€” that's literally what the page says, I'm not fixing it, I don't make the rules. πŸ’€

🌸 Description 🌸

ngl this one is short and sweet β€” the whole description is basically a link drop:

See Also: http://plan9.bell-labs.com/magic/man2html/2/stat

go read it, bestie. that's the lore. πŸ¦‹


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, in order, exactly as listed:

  • Kernel file ./include/net/9p/9p.h enum p9_debug_flags(9), enum p9_msg_t(9), enum p9_open_mode_t(9), enum p9_perm_t(9), enum p9_qid_t(9), struct p9_qid(9), struct p9_iattr_dotl(9), struct p9_fcall(9)

and that's the page, periodt. πŸ’œ this gem lives in ./include/net/9p, and the version stamp says October 2026 β€” so like, future me is reading this too. slay. πŸŽ€βœ¨πŸŒˆ

πŸ“¦ where this page comes from