ethtool_puts(9)
π 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 au8 **, it's double-pointer hours, we love a little indirectionstrβ 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:
enum ethtool_phys_id_state(9)struct kernel_ethtool_ringparam(9)enum ethtool_supported_ring_param(9)ethtool_rxfh_indir_default(9)struct ethtool_rxfh_context(9)ethtool_link_ksettings_zero_link_mode(9)ethtool_link_ksettings_add_link_mode(9)ethtool_link_ksettings_del_link_mode(9)ethtool_link_ksettings_test_link_mode(9)ethtool_intersect_link_masks(9)struct ethtool_phy_stats(9)struct ethtool_pause_stats(9)struct ethtool_fec_hist_range(9)struct ethtool_fec_stats(9)struct ethtool_rmon_hist_range(9)struct ethtool_rmon_stats(9)struct ethtool_ts_stats(9)struct ethtool_module_eeprom(9)struct ethtool_module_power_mode_params(9)struct ethtool_mm_state(9)struct ethtool_mm_cfg(9)struct ethtool_mm_stats(9)struct ethtool_mmsv_ops(9)struct ethtool_mmsv(9)struct ethtool_rxfh_param(9)struct ethtool_rxfh_fields(9)struct kernel_ethtool_ts_info(9)struct ethtool_ops(9)struct ethtool_netdev_state(9)struct ethtool_phy_ops(9)ethtool_set_ethtool_phy_ops(9)ethtool_params_from_link_mode(9)ethtool_get_phc_vclocks(9)ethtool_mm_frag_size_add_to_min(9)ethtool_mm_frag_size_min_to_add(9)ethtool_get_ts_info_by_layer(9)ethtool_sprintf(9)ethtool_cpy(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms