target_for_each_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ target_for_each_device(9) πŸŽ€

okay so bestie, this is a page from the Kernel API Manual, and the whole vibe is β€œlet’s loop over configured devices together.” No cap, it’s giving iterator energy. πŸ’…βœ¨


πŸ’– NAME πŸ’–

target_for_each_device β€” iterate over configured devices πŸ¦‹


✨ SYNOPSIS ✨

int target_for_each_device (int (*fn)(struct se_device *dev, void *data)
, void *data );

🌸 ARGUMENTS 🌸

  • fn β€” the iterator function, aka the little main character that gets called for each device πŸ‘‘
  • data β€” pointer to data that will be passed to fn, like a little care package πŸŽ€

πŸ”₯ DESCRIPTION πŸ”₯

fn must return 0 to continue looping over devices. 🫢

If fn returns non-zero, it will break from the loop and return that value to the caller. periodt. πŸ’€βœ¨


🌈 SEE ALSO 🌈

  • Kernel file ./drivers/target/target_core_device.c β€” go peek, iykyk πŸ‘€πŸ’–

fr fr, huge shoutout to the source/version ./drivers/target and the date October 2026 β€” iconic footer behavior, literally. πŸ§šπŸ’œπŸŽ€

πŸ“¦ where this page comes from