STRUCT FW_CDEV_GET_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– STRUCT FW_CDEV_GET_INFO(9) πŸ’–

okay bestie, welcome to struct fw_cdev_get_info β€” the general purpose information ioctl for FireWire character devices, and honestly? it's giving first-day-of-school energy. it's the manual page, the manual name is struct fw_cdev_get_info(9), and yes we're gonna get into it. πŸŽ€


✨ SYNOPSIS ✨

so the struct itself is literally this, no cap, copy it exactly:

struct fw_cdev_get_info {
    __u32 version;
    __u32 rom_length;
    __u64 rom;
    __u64 bus_reset;
    __u64 bus_reset_closure;
    __u32 card;
 };

🌸 Members 🌸

bestie these are the fields, and every single one matters, ok? πŸ‘‘

  • version β€” so this one is just a running serial number, but plot twist: it's both an input parameter (the ABI version implemented by the client) and an output parameter (the ABI version implemented by the kernel). a client shall fill in the ABI version that the client was implemented for β€” this is necessary for forward compatibility. so yeah, don't skip it, it's important iykyk ✨
  • rom_length β€” if rom is non-zero, then up to rom_length bytes of Configuration ROM get copied into that user space address. and in either case, rom_length is updated with the actual length of the Configuration ROM. so it comes back changed no matter what πŸ’…
  • rom β€” if non-zero, this is the address of a buffer to be filled by a copy of the device's Configuration ROM πŸ¦‹
  • bus_reset β€” if non-zero, it's the address of a buffer to be filled by a struct fw_cdev_event_bus_reset with the current state of the bus. important: this does not cause a bus reset to happen. it's just reading the vibe check, not starting drama 🌈
  • bus_reset_closure β€” the value of closure in this and subsequent bus reset events πŸŽ€
  • card β€” the index of the card this device belongs to πŸ”₯

πŸ’œ Description πŸ’œ

okay so the FW_CDEV_IOC_GET_INFO ioctl is usually the very first one a client performs right after it opened a /dev/fw* file. main character behavior honestly, it's the intro scene 🫢

and as a side effect β€” yes, side effects, we love those β€” reception of FW_CDEV_EVENT_BUS_RESET events to be read by read(2) is started by this ioctl. so this one call is lowkey opening the door for the events to come through ⭐


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/uapi/linux/firewire-cdev.h struct fw_cdev_event_common(9), struct fw_cdev_event_bus_reset(9), struct fw_cdev_event_response(9), struct fw_cdev_event_response2(9), struct fw_cdev_event_request(9), struct fw_cdev_event_request2(9), struct fw_cdev_event_request3(9), struct fw_cdev_event_iso_interrupt(9), struct fw_cdev_event_iso_interrupt_mc(9), struct fw_cdev_event_iso_resource(9), struct fw_cdev_event_phy_packet(9), struct fw_cdev_event_phy_packet2(9), union fw_cdev_event(9), struct fw_cdev_send_request(9), struct fw_cdev_send_response(9), struct fw_cdev_allocate(9), struct fw_cdev_deallocate(9), struct fw_cdev_initiate_bus_reset(9), struct fw_cdev_add_descriptor(9), struct fw_cdev_remove_descriptor(9), struct fw_cdev_create_iso_context(9), struct fw_cdev_set_iso_channels(9), struct fw_cdev_iso_packet(9), struct fw_cdev_queue_iso(9), struct fw_cdev_start_iso(9), struct fw_cdev_stop_iso(9), struct fw_cdev_flush_iso(9), struct fw_cdev_get_cycle_timer(9), struct fw_cdev_get_cycle_timer2(9), struct fw_cdev_allocate_iso_resource(9), struct fw_cdev_send_stream_packet(9), struct fw_cdev_send_phy_packet(9), struct fw_cdev_receive_phy_packets(9)


and that's the whole page bestie, you ate that πŸ“ this lil gem lives in ./include/uapi/linux, and it's dated October 2026 β€” so yeah, mark your calendar, this is struct fw_cdev_get_info(9) signing off πŸ’–βœ¨πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from