scsw_key(9)
π scsw_key β return scsw key field π
okay so real talk, bestie, this page is from the Kernel API Manual and it's about the tiniest little helper function you ever did see. it does one thing. one. and honestly? it ate. π
β¨ NAME β¨
scsw_key β return scsw key field π¦
β¨ SYNOPSIS β¨
u32 scsw_key (union scsw *scsw );
β¨ ARGUMENTS β¨
scswβ pointer to scsw. that's it, that's the whole argument. a pointer to an scsw, bestie. π«Ά
β¨ DESCRIPTION β¨
so here's the vibe: you hand it a pointer to an scsw, and it returns the value of the key field of that scsw. and the iconic part? it does this regardless of whether it's a transport mode or command mode scsw β like, it truly does not care which one you brought to the function, it's gonna get that key field either way. main character energy fr fr. π
no branching drama, no "wait which mode r u", it just hands you the u32. periodt. π
β¨ SEE ALSO β¨
the friend group π«Ά β first up, the kernel file that started it all:
- Kernel file
./arch/s390/include/asm/scsw.h
then the structs:
struct cmd_scsw(9)struct tm_scsw(9)struct eadm_scsw(9)union scsw(9)
then the general scsw getters (the OGs):
scsw_is_tm(9)scsw_eswf(9)scsw_cc(9)scsw_ectl(9)scsw_pno(9)scsw_fctl(9)scsw_actl(9)scsw_stctl(9)scsw_dstat(9)scsw_cstat(9)
okay now the cmd validity squad, they roll deep π:
scsw_cmd_is_valid_key(9)scsw_cmd_is_valid_sctl(9)scsw_cmd_is_valid_eswf(9)scsw_cmd_is_valid_cc(9)scsw_cmd_is_valid_fmt(9)scsw_cmd_is_valid_pfch(9)scsw_cmd_is_valid_isic(9)scsw_cmd_is_valid_alcc(9)scsw_cmd_is_valid_ssi(9)scsw_cmd_is_valid_zcc(9)scsw_cmd_is_valid_ectl(9)scsw_cmd_is_valid_pno(9)scsw_cmd_is_valid_fctl(9)scsw_cmd_is_valid_actl(9)scsw_cmd_is_valid_stctl(9)scsw_cmd_is_valid_dstat(9)scsw_cmd_is_valid_cstat(9)
and the tm validity squad, equally iconic, no cap β¨:
scsw_tm_is_valid_key(9)scsw_tm_is_valid_eswf(9)scsw_tm_is_valid_cc(9)scsw_tm_is_valid_fmt(9)scsw_tm_is_valid_x(9)scsw_tm_is_valid_q(9)scsw_tm_is_valid_ectl(9)scsw_tm_is_valid_pno(9)scsw_tm_is_valid_fctl(9)scsw_tm_is_valid_actl(9)scsw_tm_is_valid_stctl(9)scsw_tm_is_valid_dstat(9)scsw_tm_is_valid_cstat(9)scsw_tm_is_valid_fcxs(9)scsw_tm_is_valid_schxs(9)
then the mode-agnostic validity besties πΈ:
scsw_is_valid_actl(9)scsw_is_valid_cc(9)scsw_is_valid_cstat(9)scsw_is_valid_dstat(9)scsw_is_valid_ectl(9)scsw_is_valid_eswf(9)scsw_is_valid_fctl(9)scsw_is_valid_key(9)scsw_is_valid_pno(9)scsw_is_valid_stctl(9)
and finally the solicited trio, saving the best for last π:
ngl bestie, that SEE ALSO list is long. like, a whole group chat of functions. but every single one of them is here, so vibe check passed β
and that's the whole page, bestie!! π this lil gem lives in ./arch/s390/include/asm and the version we're looking at is dated October 2026, filed under scsw_key(9) β go off, key field. π
πβ
π¦ 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