Page MenuHomeFreeBSD

Replace calls to bus_generic_attach with bus_attach_children
AcceptedPublic

Authored by jhb on Tue, Nov 19, 3:32 PM.
Tags
None
Referenced Files
F103304204: D47675.diff
Sat, Nov 23, 7:41 AM
F103290122: D47675.id.diff
Sat, Nov 23, 3:03 AM
F103287672: D47675.id146702.diff
Sat, Nov 23, 2:32 AM
Unknown Object (File)
Fri, Nov 22, 4:25 AM
Unknown Object (File)
Thu, Nov 21, 9:00 AM
Unknown Object (File)
Tue, Nov 19, 9:48 PM
Unknown Object (File)
Tue, Nov 19, 7:53 PM

Details

Reviewers
imp
andrew
manu
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60688
Build 57572: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Tue, Nov 19, 3:32 PM
jhb requested review of this revision.Tue, Nov 19, 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.Thu, Nov 21, 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.