| History log of /src/usr.bin/config/pack.c |
| Revision | | Date | Author | Comments |
| 1.12 |
| 07-Jan-2025 |
joe | clear: trailing whitespaces
|
| 1.11 |
| 05-Apr-2024 |
riastradh | config(1): Make sort order deterministic.
Ensure we break ties in every case. This way, even though we use the unstable qsort(3) library routine, the output is reproducible, no matter what algorithm is behind qsort(3).
It would be nice if we could just use a stable sort function here, but mergesort(3) is nonstandard, so we'd have to add it to tools/compat, which is a big pain.
Instead, put a tie-breaking rule in every comparison function we use with qsort, and abort() in the event of ties -- that way, we noisily refuse to rely on unstable sort order.
While here, dispense with any question of integer overflow, and sprinkle comments.
PR bin/58115
|
| 1.10 |
| 12-Sep-2015 |
joerg | branches: 1.10.18; 1.10.26; Negating an integer and comparing it to 1 is a fancy way of checking for 0, which in this case would be DEVI_ORPHAN. That clearly can't be the intention here, so switch to using != as operation without negation instead.
|
| 1.9 |
| 29-Oct-2014 |
christos | - add RCSID's - fix -Wconversion (except scanner)
|
| 1.8 |
| 08-Mar-2010 |
pooka | branches: 1.8.24; Add a highly experimental pseudo-root feature to be used in conjuction with the also-experimental ioconf keyword. pseudo-root allows to specify a root at any point in the device tree without having attachments from the actual root.
For example, instead of having a config file like this: mainbus0 at root bus_a? at mainbus0 bus_b? at bus_a* device7 at bus_b?
You can have one like this: pseudo-root bus_b* device7 at bus_b?
This will produce the relevant ioconf.c glue for device number 7 only instead of the whole 9 yards from root. Perhaps needless to say, this can be used to generate snippets of config glue for modules and, let's not deny that my main motivation for doing this, rump components.
This is part 2/3 of my modifications to config (the last part is autogenerating source file lists and component Makefiles).
No strong objection from cube (after a little pressuring ;), but like he said, the implementation will most likely need some more tweaking and may not work correctly under all pseudo-root uses yet.
|
| 1.7 |
| 21-Jan-2010 |
pooka | Add static to packdevi() like the local prototype says.
|
| 1.6 |
| 11-Apr-2009 |
lukem | Fix WARNS=4 issues (-Wcast-qual -Wsign-compare -Wshadow)
|
| 1.5 |
| 13-Jan-2007 |
christos | branches: 1.5.20; - rename {x,}error -> cfg{x,}error and {x,}warn -> cfg{x,}warn so that we can use err(3) and warn(3) to display errors instead of using inconsistent fprintf's. - remove emalloc/estrdup etc. We have them in libutil.
|
| 1.4 |
| 26-Aug-2006 |
christos | Now that this is part of tools, we don't need the extra build glue.
|
| 1.3 |
| 01-Oct-2005 |
cube | o Keep track of negated devices in deaddevitab o Rework do_kill_orphans() to use that information and mark explicitely orphaned devices (i.e., the ones whose missing ancestor has been negated) o Make a distinction between erroneous orphans and explicit orphans. Error out on the former, ignore the later (but print a warning when -v is used)
Yes, now config(1) will actually stop if you comment out a parent. That should help people still hoping adjustkernel is relevant these days :)
|
| 1.2 |
| 30-Sep-2005 |
cube | Rework the way orphan device instances are handled. To achieve that, keep track of instances attaching at root, and walk down the tree of active device instances. Then, all instances that are not marked active are found as orphans.
Doing it that way allows us to simply ignore orphan devices, instead of warning about them and still keep them in the configuration. Now, orphaned instances are considered as never having existed.
In the end, this allows 'no <device> at <attachment>' to be much more efficient, as the user doesn't have to negate all descendents of the instance s/he actually wants to negate. Warnings are still emitted, though.
While there, make official a side-effect of the previous lack of action against orphaned instances: config(1) used to warn about instances that attach at a numbered device when no instance of that device with that number existed, even though there was a starred instance of the device.
E.g. (provided by Alan Barrett):
pciide* at pci? dev ? function ? flags 0x0000 wdc0 at isa? port 0x1f0 irq 14 flags 0x00 wdc1 at isa? port 0x170 irq 15 flags 0x00 atabus* at ata? wd0 at atabus0 drive 0
With this commit, config(1) will no longer warn about 'wd0 at atabus0'.
|
| 1.1 |
| 05-Jun-2005 |
thorpej | config and genassym are not sysadmin tools, they are development tools. As such, they don't belong in /usr/sbin, but rather /usr/bin. Move them there.
|
| 1.5.20.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
|
| 1.8.24.1 |
| 06-Mar-2015 |
snj | Pull up following revision(s) (requested by mrg in ticket #572): usr.bin/config/Makefile: up to 1.10 usr.bin/config/TODO: up to 1.14 usr.bin/config/config.1: up to 1.17 usr.bin/config/config.5: up to 1.25 usr.bin/config/defs.h: up to 1.64 usr.bin/config/files.c: up to 1.18 usr.bin/config/gram.y: up to 1.46 usr.bin/config/hash.c: up to 1.11 usr.bin/config/lint.c: up to 1.15 usr.bin/config/main.c: up to 1.74 usr.bin/config/mkdevsw.c: up to 1.12 usr.bin/config/mkheaders.c: up to 1.26 usr.bin/config/mkioconf.c: up to 1.28 usr.bin/config/mkmakefile.c: up to 1.37 usr.bin/config/mkswap.c: up to 1.8 usr.bin/config/pack.c: up to 1.9 usr.bin/config/scan.l: up to 1.22 usr.bin/config/sem.c: up to 1.71 usr.bin/config/sem.h: up to 1.19 usr.bin/config/util.c: up to 1.19 sync config(1) with HEAD.
|
| 1.10.26.1 |
| 23-Aug-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #798):
usr.bin/config/defs.h: revision 1.109 usr.bin/config/files.c: revision 1.38 usr.bin/config/mkmakefile.c: revision 1.73 usr.bin/config/pack.c: revision 1.11 usr.bin/config/mkioconf.c: revision 1.36
config(1): Make sort order deterministic.
Ensure we break ties in every case. This way, even though we use the unstable qsort(3) library routine, the output is reproducible, no matter what algorithm is behind qsort(3).
It would be nice if we could just use a stable sort function here, but mergesort(3) is nonstandard, so we'd have to add it to tools/compat, which is a big pain.
Instead, put a tie-breaking rule in every comparison function we use with qsort, and abort() in the event of ties -- that way, we noisily refuse to rely on unstable sort order.
While here, dispense with any question of integer overflow, and sprinkle comments.
PR bin/58115
|
| 1.10.18.1 |
| 23-Aug-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #1875):
usr.bin/config/defs.h: revision 1.109 usr.bin/config/files.c: revision 1.38 usr.bin/config/mkmakefile.c: revision 1.73 usr.bin/config/pack.c: revision 1.11 usr.bin/config/mkioconf.c: revision 1.36
config(1): Make sort order deterministic.
Ensure we break ties in every case. This way, even though we use the unstable qsort(3) library routine, the output is reproducible, no matter what algorithm is behind qsort(3).
It would be nice if we could just use a stable sort function here, but mergesort(3) is nonstandard, so we'd have to add it to tools/compat, which is a big pain.
Instead, put a tie-breaking rule in every comparison function we use with qsort, and abort() in the event of ties -- that way, we noisily refuse to rely on unstable sort order.
While here, dispense with any question of integer overflow, and sprinkle comments.
PR bin/58115
|