HomeFreeBSD

kldxref: Refactor PNP entry parsing, no functional change

Description

kldxref: Refactor PNP entry parsing, no functional change

  • Add a free_pnp_list to complement parse_pnp_list. Add freeing of 'new_desc' which was previously leaked.
  • Move body of loop that checked a single pnp list element against a table entry into a parse_pnp_entry function to reduce indentation and split parse_entry into a smaller function.
  • Similarly, split out a record_pnp_info function from parse_entry which builds the pnp_list and walks a table.

Reviewed by: imp
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D42965

Details

Provenance
jhbAuthored on Dec 12 2023, 11:30 PM
Reviewer
imp
Differential Revision
D42965: kldxref: Refactor PNP entry parsing, no functional change
Parents
rG4a3cf5f329d6: Stop #defining FREEBSD_ELF
Branches
Unknown
Tags
Unknown