Page MenuHomeFreeBSD

devmatch(8): Respect mask field when matching strings.
ClosedPublic

Authored by wulf on Oct 17 2020, 12:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 23 2024, 8:20 AM
Unknown Object (File)
Oct 19 2024, 9:09 PM
Unknown Object (File)
Oct 1 2024, 5:35 PM
Unknown Object (File)
Oct 1 2024, 3:08 PM
Unknown Object (File)
Sep 28 2024, 2:13 AM
Unknown Object (File)
Sep 26 2024, 8:21 PM
Unknown Object (File)
Sep 20 2024, 5:53 AM
Unknown Object (File)
Sep 12 2024, 4:39 AM
Subscribers
None

Details

Summary

Currently, only integer fields of descriptor string can be masked out for matching. This patch adds support for masking of 'Z' type field.

While here, add debug output for this action.

Diff Detail

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

Event Timeline

wulf requested review of this revision.Oct 17 2020, 12:19 AM
wulf created this revision.
sbin/devmatch/devmatch.c
352 ↗(On Diff #78338)

When would bit by < 0?

sbin/devmatch/devmatch.c
352 ↗(On Diff #78338)

It starts iterating from -1. May be the first field is dedicated to mask itself?

sbin/devmatch/devmatch.c
352 ↗(On Diff #78338)

Yes.... I don't think the check is needed, but I'm not sure

sbin/devmatch/devmatch.c
352 ↗(On Diff #78338)

I borrowed the check from integer case to not introduce new bugs.

imp added inline comments.
sbin/devmatch/devmatch.c
352 ↗(On Diff #78338)

I borrowed the check from integer case to not introduce new bugs.

Fair enough. Keep it...

This revision is now accepted and ready to land.Oct 17 2020, 12:53 AM