sshp_buf_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sshp_buf_alloc β€” okay so this is the glow-up page for your SSH parser buffer ✨

Welcome to the Kernel API Manual, bestie πŸŽ€ β€” today's main character is sshp_buf_alloc(9), and no cap, she's the one who sets your buffer up so it can actually live.


🌸 NAME 🌸

sshp_buf_alloc β€” allocate and initialize a SSH parser buffer. Literally her whole job πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

int sshp_buf_alloc (struct sshp_buf *buf , size_t cap , gfp_t flags );

✨ ARGUMENTS ✨

  • buf β€” the buffer you're initializing/allocating to 🫢 like, this is the one getting the makeover.
  • cap β€” the desired capacity of the buffer. how much room she gets to vibe in πŸ’…
  • flags β€” the flags used for allocating the memory. the ~parameters~ of the whole operation, iykyk.

πŸ’œ DESCRIPTION πŸ’œ

So here's the tea β˜•: sshp_buf_alloc allocates cap bytes and initializes the provided buffer struct with the allocated memory. That's it, that's the whole slay πŸ”₯


πŸ‘‘ RETURN πŸ‘‘

Returns zero on success 🌈 and -ENOMEM if allocation failed 😭 (yes, that's the sad-path vibe check, and she does not pass it).


🧚 SEE ALSO 🧚

Kernel file ./drivers/platform/surface/aggregator/ssh_parser.h struct sshp_buf(9), sshp_buf_init(9), sshp_buf_free(9), sshp_buf_drop(9), sshp_buf_read_from_fifo(9), sshp_buf_span_from(9) β€” go read the whole friend group, fr fr πŸ’–


okay bestie that's the page πŸ’€ go forth and allocate responsibly ✨

Signed, sealed, delivered with love from ./drivers/platform/surface/agg..., dated October 2026, and yes β€” this whole iconic moment is still filed under sshp_buf_alloc(9) πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from