ethtool_puts(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ethtool_puts β€” aka ethtool_puts(9), from the Kernel API Manual ✨

okay so bestie, welcome to the ethtool string-writing corner of the kernel 🌸 this one lives in the Kernel API Manual and honestly? it's giving tiny-but-essential. like a little fairy 🧚 that just drops a string in place and moves on. no cap.


✨ NAME ✨

ethtool_puts β€” write string to ethtool string data πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void ethtool_puts (u8 **data , const char *str );

like, that's the whole signature. two args. that's it. that's the vibe. πŸ’…


🌸 ARGUMENTS 🌸

  • data β€” pointer to a pointer to the start of the string you're gonna update πŸ‘€ yes, it's a u8 **, it's double-pointer hours, we love a little indirection
  • str β€” the string you actually want to write πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

So here's the tea β˜•: this bad boy writes str into *data without a trailing newline β€” no sneaky \n sneaking in, periodt. then it updates *data so it points at the start of the next string, meaning you can just keep calling it and it keeps walking forward πŸšΆβ€β™€οΈβœ¨ it's giving conveyor belt, it's giving main character energy.

And lowkey an important note: prefer this function to ethtool_sprintf when you're only given two arguments, or if fmt is literally just "s" πŸ‘‘ like, don't make ethtool_sprintf do the work when ethtool_puts exists. let her shine. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

alright bestie, buckle up, this list is long β€” but every single one of these is part of the family and we're not skipping a single one 🫢

Kernel file ./include/linux/ethtool.h, plus:

like… that's the whole extended friend group 😭 iykyk 🌈


ngl there's nothing dangerous here β€” it's just a string copy with a pointer bump πŸ“ but don't forget the no-newline thing, fr fr, because that's literally the whole personality of this function πŸ’€

and that's the page!! 🌟 source: ./include/linux, dated October 2026 β€” mwah, bye bestie, go write some strings πŸ’œπŸ«ΆπŸŽ€

πŸ“¦ where this page comes from