Page MenuHomeFreeBSD

Replace calls to bus_generic_attach with bus_attach_children
ClosedPublic

Authored by jhb on Nov 19 2024, 3:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 12, 3:09 AM
Unknown Object (File)
Sat, Jan 11, 11:50 PM
Unknown Object (File)
Sat, Jan 11, 2:46 PM
Unknown Object (File)
Sat, Jan 11, 2:44 PM
Unknown Object (File)
Sat, Jan 11, 4:28 AM
Unknown Object (File)
Sat, Jan 11, 4:09 AM
Unknown Object (File)
Sat, Jan 11, 3:39 AM
Unknown Object (File)
Fri, Jan 10, 6:05 AM

Details

Reviewers
imp
andrew
manu
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rG18250ec6c089: Replace calls to bus_generic_attach with bus_attach_children

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Nov 19 2024, 3:32 PM
jhb requested review of this revision.Nov 19 2024, 3:32 PM

I spot checked a few, they looked good.
The Linux folks use coccinelle https://en.wikipedia.org/wiki/Coccinelle_(software) to mechanically do these sorts of transformations and publish the script used.

This revision is now accepted and ready to land.Nov 21 2024, 10:43 PM

The Linux folks use coccinelle

Yeah it would be great to have coccinelle for downstream projects to apply the same change in derived repos.

The Linux folks use coccinelle

Yeah it would be great to have coccinelle for downstream projects to apply the same change in derived repos.

Both of these were not fully automatable since the new functions return void instead of always returning 0, so you have to fix places that were checking for an error. That said, I just used sed -i -e 's/bus_generic_attach/bus_attach_children/g' and then fixed the errors for places that were checking for error.