Page MenuHomeFreeBSD

devmatch: Actually ignore fields tagged as '#'
ClosedPublic

Authored by val_packett.cool on Mar 22 2022, 12:02 PM.
Tags
None
Referenced Files
F166308034: D34633.id.diff
Wed, Aug 12, 7:37 PM
F166260635: D34633.id104084.diff
Wed, Aug 12, 2:38 PM
F166234949: D34633.id104084.diff
Wed, Aug 12, 12:33 PM
F166228939: D34633.diff
Wed, Aug 12, 12:00 PM
Unknown Object (File)
Mon, Aug 10, 10:11 AM
Unknown Object (File)
Mon, Aug 10, 6:38 AM
Unknown Object (File)
Sat, Aug 8, 4:22 AM
Unknown Object (File)
Sat, Aug 8, 2:28 AM

Details

Summary

None of the iflib based drivers were being matched by devmatch, because
the ignore fields were not actually ignored. strcmp does compare
the null terminator, so only strcmp("I:#" + 2, "#") would actually
return 0, but e.g. strcmp("I:#;" + 2, "#") returns 1.

Fixes: 5dedd2517db3 ("devmatch: Ignore the pnp fields tagged as ignore ('#')")

Test Plan

Try devmatching on e.g. an if_igc device before and after :)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44851
Build 41739: arc lint + arc unit

Event Timeline

sbin/devmatch/devmatch.c
361

This one too?

This revision is now accepted and ready to land.Jun 27 2022, 8:37 PM

This one slipped my mind. I'll commit it today.