Page MenuHomeFreeBSD

Cleanup kldxref sources
ClosedPublic

Authored by mhorne063_gmail.com on Jan 16 2018, 10:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 2 2024, 6:17 AM
Unknown Object (File)
Sep 30 2024, 9:26 PM
Unknown Object (File)
Sep 20 2024, 3:12 AM
Unknown Object (File)
Sep 16 2024, 2:12 PM
Unknown Object (File)
Sep 1 2024, 7:18 AM
Unknown Object (File)
Aug 17 2024, 8:41 PM
Unknown Object (File)
Aug 16 2024, 5:40 PM
Unknown Object (File)
Aug 9 2024, 12:36 AM
Subscribers

Details

Summary

There are some style inconsistencies in the kldxref source files, this patch should fix most of them in accordance to style(9)
Some of these were discussed on a previous revision here.
Quick summary:

  • Use designated initializers for structs
  • Always use bracketed return style
  • No initialization in declarations
  • Align function prototype names
  • Remove old commented code/unused imports

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

usr.sbin/kldxref/ef.c
121 ↗(On Diff #38068)

The alignment here is correct, phabricator just doesn't seem to display it properly.

usr.sbin/kldxref/ef_obj.c
139 ↗(On Diff #38068)

Same as above, alignment doesn't display properly in phabricator.

usr.sbin/kldxref/ef.c
83 ↗(On Diff #38068)

Can you extract the change of the return value to Elf_Off ?

296 ↗(On Diff #38068)

Perhaps use %jx and (uintmax_t)ef_get_offset().

304 ↗(On Diff #38068)

if (error != 0)

Use explicit conditions (error != 0).
Remove the change to ef_get_offset() return type for another patch.

This revision is now accepted and ready to land.Jan 17 2018, 7:00 PM

Changed pointer justification in the struct at the beginning of ef.c

This revision now requires review to proceed.Jan 17 2018, 7:50 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jan 17 2018, 8:00 PM
Closed by commit rS328094: kldxref: improve style(9) (authored by emaste). · Explain Why
This revision was automatically updated to reflect the committed changes.