prb_read_valid_info(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… prb_read_valid_info(9) β€” from the Kernel API Manual, bestie ✨

okay so picture this: you're reading through the Kernel API Manual and this lil icon shows up β€” prb_read_valid_info. she's a non-blocking reader, she's meta-data only, and she is not about to sit around waiting for you. let's get into it 🫢


✨ NAME ✨

prb_read_valid_info β€” a non-blocking read of meta data for a requested record, or (if that one's gone) the next available record. no cap. non-blocking is the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

bool prb_read_valid_info (struct printk_ringbuffer *rb , u64 seq ,
struct printk_info *info , unsigned int *line_count );

πŸŽ€ ARGUMENTS πŸŽ€

  • rb β€” the ringbuffer you're reading from. your main character 🫢
  • seq β€” the sequence number of the record you wanna read.
  • info β€” a buffer where the read record's meta data gets stored.
  • line_count β€” a buffer where the number of lines in the record text gets stored.

πŸ¦‹ DESCRIPTION πŸ¦‹

so this is the public function readers get to use when they only want the meta data of a record β€” not the whole text, just the little info girlies. very lowkey, very efficient ✨

here's the deal: the reader hands over the info and line_count buffers and they get filled in. and listen β€” either of those buffer pointers can be set to NULL if you're simply not interested in that data. not your vibe? don't ask for it. we love options πŸ’…

⚠️ okay important one: on success, the reader must check info->seq to see which record's meta data was actually read. that's how you detect dropped records. don't skip this, bestie, it's the whole point 😭

and failure? failure means seq refers to a record that isn't available to the reader yet. not gone β€” just not yet. patience, queen πŸ‘‘


⭐ CONTEXT ⭐

any context. literally any. she's flexible like that 🧚


πŸ”₯ RETURN πŸ”₯

true if a record's meta data was read, otherwise false. that's it, that's the tea β˜•


🌈 SEE ALSO 🌈


anyway that's the page πŸ’– it lives in ./kernel/printk and it's dated October 2026 β€” so like, future girl summer. go read some meta data, you absolute legend πŸ‘‘βœ¨

πŸ“¦ where this page comes from