History log of /freebsd/sbin/devmatch/devmatch.c (Results 1 – 25 of 27)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 9b2f2fbf 23-Oct-2024 Mark Johnston <markj@FreeBSD.org>

devmatch: Catch truncated linker hints files

PR: 282268
Reviewed by: christos, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47243


Revision tags: release/13.4.0, release/14.1.0
# ea002c10 06-Apr-2024 Warner Losh <imp@FreeBSD.org>

devmatch: Convert command line flags to bools

These are bools, and should have been bools from the start. Make them
bools.

Sponsored by: Netflix


# 03cfd919 06-Apr-2024 Warner Losh <imp@FreeBSD.org>

devmatch: Make -a work for all devices

devmatch -a should produce output for all attached devices, but doesn't.

Noticed by: cperciva
Sponsored by: Netflix


Revision tags: release/13.3.0
# 32e86a82 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sbin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remo

sbin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


Revision tags: release/14.0.0
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# a1df36f1 13-Aug-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

devmatch: introduce quiet command line option

In setups without hints whatsoever one can get a long list of
"Can't read linker hints file" error messages during boot.
Add a -q/--quiet option which w

devmatch: introduce quiet command line option

In setups without hints whatsoever one can get a long list of
"Can't read linker hints file" error messages during boot.
Add a -q/--quiet option which would suppress the noise and leave
space for more essential information.

While here switch to a pre-defined exit code from sysexits.

MFC after: 4 weeks
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D41443

show more ...


Revision tags: release/13.2.0, release/12.4.0
# e6ba4cda 27-Jun-2022 Greg V <greg@unrelenting.technology>

devmatch: Properly ignore commented fields

Any field that starts with # is a commented out field (there as a place
holder only, the data in that place holder is completely ignored). The
previous cod

devmatch: Properly ignore commented fields

Any field that starts with # is a commented out field (there as a place
holder only, the data in that place holder is completely ignored). The
previous code improperly detected this using strcmp. Instead, any field
whose names starts with '#' is ignored.

Differential Reivsion: https://reviews.freebsd.org/D34633

show more ...


Revision tags: release/13.1.0, release/12.3.0
# 5dedd251 10-Aug-2021 Warner Losh <imp@FreeBSD.org>

devmatch: Ignore the pnp fields tagged as ignore ('#')

When matching entries, we should ignore those with a name of '#'. It's
the standard way to skip elements and need to be present to have the
pro

devmatch: Ignore the pnp fields tagged as ignore ('#')

When matching entries, we should ignore those with a name of '#'. It's
the standard way to skip elements and need to be present to have the
proper offsets to the fields that are observed. No bus has a pnp
attribute of '#' and that is now disallowed for future buses that are
written.

Sponsored by: Netflix
Reviewed by: kbowling
Differential Revision: https://reviews.freebsd.org/D31482

show more ...


Revision tags: release/13.0.0
# 3bdb6846 31-Oct-2020 Vladimir Kondratyev <wulf@FreeBSD.org>

devmatch(8): Respect mask field when matching strings of Z type.

While here, add debug output for this action.

Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org

devmatch(8): Respect mask field when matching strings of Z type.

While here, add debug output for this action.

Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D26823

show more ...


Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0
# 8e69ae1c 05-Feb-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r343712 through r343806.


# 52467047 04-Feb-2019 Warner Losh <imp@FreeBSD.org>

Regularize the Netflix copyright

Use recent best practices for Copyright form at the top of
the license:
1. Remove all the All Rights Reserved clauses on our stuff. Where we
piggybacked others, u

Regularize the Netflix copyright

Use recent best practices for Copyright form at the top of
the license:
1. Remove all the All Rights Reserved clauses on our stuff. Where we
piggybacked others, use a separate line to make things clear.
2. Use "Netflix, Inc." everywhere.
3. Use a single line for the copyright for grep friendliness.
4. Use date ranges in all places for our stuff.

Approved by: Netflix Legal (who gave me the form), adrian@ (pmc files)

show more ...


Revision tags: release/12.0.0
# da2d1e9d 29-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r338298 through r338391.


# 4a82f368 25-Aug-2018 Warner Losh <imp@FreeBSD.org>

Add in a missing newline

In the conversion, the newline got stripped. It worked fine when there
was only one module, but not when there are many. Add back the missing
newline.

Approved by: re@ (kib

Add in a missing newline

In the conversion, the newline got stripped. It worked fine when there
was only one module, but not when there are many. Add back the missing
newline.

Approved by: re@ (kib)
PR: 230868
Differential Revision: https://reviews.freebsd.org/D16895

show more ...


# 7847e041 24-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r338026 through r338297, and resolve conflicts.


# ce1ba01c 23-Aug-2018 Warner Losh <imp@FreeBSD.org>

When trying to match the nomatch event passed to us, attempt to look
up the device described by the nomatch event in the device tree. If we
find it, then if the device is marked as have already attac

When trying to match the nomatch event passed to us, attempt to look
up the device described by the nomatch event in the device tree. If we
find it, then if the device is marked as have already attached to a
device once, then ignore the device.

This keeps us from reloading the device driver when it has just been
manually unloaded. All devies that have had a driver attach to them at
least once no longer participate in pnp-based autoloading.

Differential Revision: https://reviews.freebsd.org/D16735

show more ...


# d36967bd 23-Aug-2018 Warner Losh <imp@FreeBSD.org>

Add a new device flag: DF_ATTACHED_ONCE

This flag is set once the device has been successfully attached. When
set, it inhibits devmatch from trying to match the device. This in
turn allows kldunload

Add a new device flag: DF_ATTACHED_ONCE

This flag is set once the device has been successfully attached. When
set, it inhibits devmatch from trying to match the device. This in
turn allows kldunload to work as expected. Prior to the change, the
driver would immediately reload because devmatch had no notion that
the driver had once been attached, and therefore shouldn't participate
in further matching.

Differential Revision: https://reviews.freebsd.org/D16735

show more ...


# 84725a5f 23-Aug-2018 Warner Losh <imp@FreeBSD.org>

Remove sorting of matches and print all the matches as we find them.

This backs out the hack we added in r329458. Now that we can freeze /
thaw probing, this is a much better solution to that proble

Remove sorting of matches and print all the matches as we find them.

This backs out the hack we added in r329458. Now that we can freeze /
thaw probing, this is a much better solution to that problem. Revert
to simply printing the results as we find them, and relying on an
external sort | uniq to clean up the list.

Differential Revision: https://reviews.freebsd.org/D16735

show more ...


Revision tags: release/11.2.0
# 44a230cd 15-Jun-2018 John Baldwin <jhb@FreeBSD.org>

Exit with an error if a linker hints file can't be found.

Continuing with a NULL hints variable just triggers a segfault later on.
The other error cases in this function all exit for an error rather

Exit with an error if a linker hints file can't be found.

Continuing with a NULL hints variable just triggers a segfault later on.
The other error cases in this function all exit for an error rather than
warning.

Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D15579

show more ...


# c798d98e 20-Feb-2018 Warner Losh <imp@FreeBSD.org>

More verbose output.


# bbd4852a 19-Feb-2018 Warner Losh <imp@FreeBSD.org>

Print more info for -v runs and temp hack for usb vs uhub

Despite best efforts to regularize, there's a few tables in the system
that still report they are for bus usb when they are really for bus
u

Print more info for -v runs and temp hack for usb vs uhub

Despite best efforts to regularize, there's a few tables in the system
that still report they are for bus usb when they are really for bus
uhub (where usb devices attach). Add a temporary workaround for this
until these places have been eliminated (likely my fault).

Second, when running verbose, describe what we're doing when
searching. This output can be quite long, but says exactly what's
going on (this output is to stdout, so it's useless for scripting).

show more ...


# 201c7381 17-Feb-2018 Hans Petter Selasky <hselasky@FreeBSD.org>

Fix USB driver matching in devmatch(8).

Multiple drivers can match on the same USB device and the order of loading
decides which driver gets the device. Use the supplied mask value as an
indication

Fix USB driver matching in devmatch(8).

Multiple drivers can match on the same USB device and the order of loading
decides which driver gets the device. Use the supplied mask value as an
indication of priority, so that vendor specific device drivers are loaded
before more generic ones.

Sponsored by: Mellanox Technologies

show more ...


# 3fa2c048 17-Feb-2018 Warner Losh <imp@FreeBSD.org>

Implement --hints to read hints file directly

In testing, it's often useful to copy a few files into a directory and
kldxref them to ensure that particular cases are handled correctly.
Add --hints (

Implement --hints to read hints file directly

In testing, it's often useful to copy a few files into a directory and
kldxref them to ensure that particular cases are handled correctly.
Add --hints (-h) to facilitate this testing and enable future
automated testing.

Sponsored by: Netflix

show more ...


# d38a8a7a 17-Feb-2018 Warner Losh <imp@FreeBSD.org>

Add option to parse NOMATCH event and suggest modules to load

Add --nomatch/-p to search for individual drivers based on a NOMATCH
event from devd.

Submitted by: hps (earlier version)
Sponsored by:

Add option to parse NOMATCH event and suggest modules to load

Add --nomatch/-p to search for individual drivers based on a NOMATCH
event from devd.

Submitted by: hps (earlier version)
Sponsored by: Netflix

show more ...


# 5e0195c8 17-Feb-2018 Warner Losh <imp@FreeBSD.org>

Tweak the 'I' flagged value

'I' was omitting 'zero' values. This is not quite correct, and was put
in as a hack but not documented. Remove it. If we find what the hack
was really needed for, we'll e

Tweak the 'I' flagged value

'I' was omitting 'zero' values. This is not quite correct, and was put
in as a hack but not documented. Remove it. If we find what the hack
was really needed for, we'll either fix the need for it, or invent a
new flagged value type.

Submitted by: hps@
Sponsored by: Netflix

show more ...


# b9c40202 17-Feb-2018 Warner Losh <imp@FreeBSD.org>

Implement 'T' field matching.

Implement 'T' field matching. This is needed to prevent false
positives. However, it's not general enough. It only handles one field
and there's a ton of edge cases eve

Implement 'T' field matching.

Implement 'T' field matching. This is needed to prevent false
positives. However, it's not general enough. It only handles one field
and there's a ton of edge cases even with that it likely wouldn't
handle. To do it more generally and also eliminate a lot of the
hackiness that's in this program now, we'd need to creating
directories for lookups ala awk, pearl, python, etc. It appears to be
sufficient, though, to get my keyboard loaded on boot.

Sponsored by: Netflix

show more ...


12