scsi_get_device_flags_keyed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– scsi_get_device_flags_keyed(9) πŸ’–

ok so bestie, you're reading the scsi_get_device_flags_keyed(9) page from the Kernel API Manual β€” yes, the kernel one, we're literally in the big leagues now ✨ grab a strawberry drink and let's go πŸ“


🌸 NAME 🌸

scsi_get_device_flags_keyed β€” get device specific flags from the dynamic device list πŸ‘‘

like, you want the flags that are specific to a device? this is the function that fishes them out of the dynamic device list for you. no cap 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

blist_flags_t scsi_get_device_flags_keyed (struct scsi_device *sdev ,
const unsigned char *vendor , const unsigned char *model , enum
scsi_devinfo_key key );

the vibe check: it hands you back a blist_flags_t, and it wants a struct scsi_device *sdev, a couple of const unsigned char * strings (vendor and model), and an enum scsi_devinfo_key key to tell it which list to rummage through πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • sdev β€” the scsi_device you want flags for. your main character device, basically πŸ’«
  • vendor β€” vendor name. who made it 🏷️
  • model β€” model name. which one is it 🌈
  • key β€” the list to look up. tells the function which scsi_dev_info_list to go digging in πŸ”‘

✨ DESCRIPTION ✨

okay so here's what actually happens πŸ‘‡

it searches the scsi_dev_info_list specified by key for an entry matching vendor and model. if it finds one, it returns the matching flags value. slay πŸ’…

but if it doesn't find one? it returns the host or global default settings instead β€” no big dramatic meltdown, just the defaults, and honestly that's a healthy boundary 🧚

and the little detail iykyk: this is called during scan time πŸ”₯


πŸ’œ SEE ALSO πŸ’œ

kernel file ./drivers/scsi/scsi_devinfo.c β€” that's where the real action lives, go read it bestie πŸ“–


πŸ’€ reminder: every single one of these is a real reference from the page β€” don't skip 'em, they're the whole friend group 🫢

and that's the page, periodt πŸŽ€ this little beauty lives over in ./drivers/scsi, it's dated October 2026, and it answers to scsi_get_device_flags_keyed(9) β€” mwah, go get those flags bestie πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from