cmf_read(9)
π cmf_read(9) β from the Kernel API Manual, bestie π
okay so picture this: you're deep in the kernel, you've got a channel measurement block situation, and you just want one little value out of it. that's this function. it's giving "i only need one thing from the store" energy. and honestly? iconic.
β¨ NAME β¨
cmf_read β read one value from the current channel measurement block π¦
no cap, that's the whole pitch: one call, one value, straight out of the current CMB.
πΈ SYNOPSIS πΈ
u64 cmf_read (struct ccw_device *cdev , int index );
yes the spacing is exactly like that, don't come for me, i don't make the rules π
π ARGUMENTS π
cdevβ the channel to be read. this is your main character, the device you're pulling info from π«Άindexβ the index of the value to be read. i.e. which value you want. you gotta pick one, bestie, you can't have them all with this function.
β RETURN β
you get back the value you read β a u64, slay. or 0 if the value cannot be read. so like, 0 is the "nope, couldn't get it" answer. keep that in mind, because it's not throwing an error at you, it's just handing you a zero π
π₯ CONTEXT π₯
any. literally any context. no constraints, no special locking preconditions listed, just vibes. go off whenever π
π SEE ALSO π
the whole friend group lives in the kernel file ./drivers/s390/cio/cmf.c, and here's the squad:
enum cmb_format(9)struct cmb_operations(9)struct cmb_area(9)struct cmb(9)struct cmbe(9)enable_cmf(9)__disable_cmf(9)disable_cmf(9)cmf_readall(9)cmf_reactivate(9)
cmf_readall(9) is the one that reads everything when you're feeling greedy β this page's function is the "just one, thanks" option β¨
π§ tiny reminder:cmf_readhands you0when it can't read the value, so if0is a legitimately possible reading for whatever you're asking for, that's a you problem to figure out. i'm just the messenger π
and that's the page, bestie!! mwah π this one came from ./drivers/s390/cio, dated October 2026, and it's cmf_read(9) in the Kernel API Manual β go read a channel measurement block for me, periodt. π
π¦ 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