ethtool_cpy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ethtool_cpy(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so this is ethtool_cpy(9) from the Kernel API Manual, and before you ask β€” yes, it's a whole little function for putting strings into ethtool string data, and yes, the "possibly-not-NUL-terminated" of it all is the main character here. Let's get into it ✨


🌸 NAME 🌸

ethtool_cpy β€” write a string that might not be NUL-terminated into ethtool string data 🫢

like, that's literally the whole job. no cap.


✨ SYNOPSIS ✨

ethtool_cpy (data , str );

that's it, that's the vibe check πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • data β€” a pointer to a pointer to the start of the string you're writing into. yes, double pointer. two layers. it's giving inception, but make it C 😭
  • str β€” a NUL-byte padded char array of size ETH_GSTRING_LEN that you're copying from. note the padding, bestie β€” it's NUL-byte padded, not necessarily NUL-terminated, and that distinction is the whole plot πŸ‘‘

πŸ‘‘ SEE ALSO πŸ‘‘

like a true icon, ethtool_cpy rolls deep. the whole clique lives in the kernel file ./include/linux/ethtool.h β€” here's everybody in the group chat πŸ’–

like I said β€” entire friend group. and honestly ethtool_sprintf(9) and ethtool_puts(9) are right there at the end being the sibling energy of it all 🌈


ok real talk though bestie: str is only padded to ETH_GSTRING_LEN, so don't be out here assuming it's NUL-terminated. that's the whole reason this function exists instead of you just vibing with strcpy. respect the padding πŸ“

and that's the page!! 🧚 it lives in ./include/linux, dated October 2026, in the Kernel API Manual β€” mwah, sending you a big kiss, go forth and copy your strings correctly πŸ’œπŸŒΈβœ¨

πŸ“¦ where this page comes from