seq_put_hex_ll(9)
β¨ seq_put_hex_ll(9) β¨
okay so bestie, this is a page straight out of the Kernel API Manual and it's all about seq_put_hex_ll β the little icon that puts a number in hexadecimal notation π
like it's literally the hex glow-up button for your seq_file output.
πΈ SYNOPSIS πΈ
void seq_put_hex_ll (struct seq_file *m , const char *delimiter ,
unsigned long long v , unsigned int width );
that's the whole vibe: you hand it a buffer, a lil string, a number, and a width, and it does its thing β¨
π ARGUMENTS π
mβ theseq_filethat identifies the buffer where the data should be written π«Ά like, this is where the hex magic lands.delimiterβ a string which is printed before the number π so it's the cute lil intro before the main character (the number) shows up.vβ the number π the actual digits we're flexing in hex.widthβ a minimum field width π so your number never looks underdressed.
π DESCRIPTION π
okay so the big slay here is this equality:
seq_put_hex_ll(m, "", v, 8) is equal to seq_printf(m, "08llx", v)
literally identical energy, no cap π―
and here's the tea: this routine is very quick when you show lots of numbers π₯ like, it's giving performance, it's giving efficiency, it's giving main character speed.
but ngl, in usual cases, it will be better to use seq_printf. It's easier to read π so like, yeah, the fast one is fast, but the readable one is readable β pick your fighter, bestie π
lowkey important: this page is saying seq_printf is the usual-case winner because it's easier to read β don't come for me, that's literally what it says π«Ά
π¦ SEE ALSO π¦
Kernel file ./fs/seq_file.c β and the whole squad of seq friends, fr fr:
seq_open(9)seq_read(9)seq_lseek(9)seq_release(9)seq_escape_mem(9)seq_mangle_path(9)seq_path(9)seq_file_path(9)seq_put_decimal_ull_width(9)seq_write(9)seq_pad(9)seq_hlist_start(9)seq_hlist_start_head(9)seq_hlist_next(9)seq_hlist_start_rcu(9)seq_hlist_start_head_rcu(9)seq_hlist_next_rcu(9)seq_hlist_start_percpu(9)seq_hlist_next_percpu(9)
and that's the whole page, bestie π this gem lives in ./fs, dated October 2026, and it's filed under seq_put_hex_ll(9) β go forth and hex responsibly πβ¨
π¦ 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