aboutsummaryrefslogtreecommitdiff
path: root/sbin/devmatch
Commit message (Collapse)AuthorAgeFilesLines
* devmatch(8): Fix section orderingGordon Bergling2020-11-201-4/+4
| | | | | | | - sections out of conventional order: Sh HISTORY Notes: svn path=/head/; revision=367897
* devmatch(8): Respect mask field when matching strings of Z type.Vladimir Kondratyev2020-10-311-0/+5
| | | | | | | | | | | While here, add debug output for this action. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26823 Notes: svn path=/head/; revision=367237
* devmatch: First appeared in 12.0Warner Losh2020-10-131-2/+6
| | | | | | | | | | Document that devmatch first appeared in FreeBSD 12.0. Also can't -> can not. But it doesn't help the sentence much. MFC After: 3 days Notes: svn path=/head/; revision=366662
* Fix a few mandoc issuesGordon Bergling2020-10-091-2/+2
| | | | | | | | | | | - no blank before trailing delimiter - whitespace at end of input line - sections out of conventional order - normalizing date format - AUTHORS section without An macro Notes: svn path=/head/; revision=366572
* Update Makefile.depend filesSimon J. Gerraty2019-12-111-0/+17
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* Regularize the Netflix copyrightWarner Losh2019-02-042-5/+2
| | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=343755
* Add in a missing newlineWarner Losh2018-08-251-1/+1
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=338314
* When trying to match the nomatch event passed to us, attempt to lookWarner Losh2018-08-231-5/+60
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=338237
* Add a new device flag: DF_ATTACHED_ONCEWarner Losh2018-08-231-0/+2
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=338236
* Remove sorting of matches and print all the matches as we find them.Warner Losh2018-08-231-60/+2
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=338235
* Exit with an error if a linker hints file can't be found.John Baldwin2018-06-141-6/+2
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=335181
* More verbose output.Warner Losh2018-02-201-0/+2
| | | | Notes: svn path=/head/; revision=329633
* Print more info for -v runs and temp hack for usb vs uhubWarner Losh2018-02-181-5/+22
| | | | | | | | | | | | | | 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). Notes: svn path=/head/; revision=329538
* Fix USB driver matching in devmatch(8).Hans Petter Selasky2018-02-171-2/+63
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=329458
* Implement --hints to read hints file directlyWarner Losh2018-02-172-38/+69
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=329446
* Add option to parse NOMATCH event and suggest modules to loadWarner Losh2018-02-172-3/+55
| | | | | | | | | | | Add --nomatch/-p to search for individual drivers based on a NOMATCH event from devd. Submitted by: hps (earlier version) Sponsored by: Netflix Notes: svn path=/head/; revision=329444
* Tweak the 'I' flagged valueWarner Losh2018-02-171-1/+1
| | | | | | | | | | | | | '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 Notes: svn path=/head/; revision=329443
* Implement 'T' field matching.Warner Losh2018-02-171-0/+18
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=329442
* Warn when we encounter unknown PNP field specifiers.Warner Losh2018-02-171-0/+1
| | | | | | | | | | The 'T' field went unimplemented for months due to a lack of warning. Add a warnings to detect mistakes sooner. Sponsored by: Netflix Notes: svn path=/head/; revision=329439
* devmatch.8: Link to MODULE_PNP_INFO(9)Conrad Meyer2018-02-121-2/+3
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=329186
* Move devmatch to sbin from usr/sbin.Warner Losh2018-02-123-0/+524
Since we want to use devmatch in context before a split /,/usr system has mounted /usr, move devmatch to /sbin. Sponsored by: Netflix Notes: svn path=/head/; revision=329161