Commit Graph

9 Commits

Author SHA1 Message Date
christos c7295a4c51 - 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.
2007-01-13 23:47:36 +00:00
dsl 342d35797b Instead of trying to check the return value of every fprintf() and fputs()
call - which makes the code completely impossibly to follow, call fflush()
and ferror() just prior to calling fclose().
This has the advantage of actually detecting the any write errors, since
the output is block bufferred and will typically not happen during fprintf()
but only during the fclose() - where it is difficult to report.
I also singlilarly refuse to add (void) casts to every printf call in the
system - since it almost never makes any sense to look at the return value
(unless you want to know how many bytes were actually writtem).
2006-10-04 20:34:48 +00:00
christos e07b7e508b build complete initializations. 2006-08-28 01:45:41 +00:00
drochner fe5f2a85b5 Make sure that only specisications for _interface_ attributes are
emitted, the rest is useless at runtime.
saves some bloat in ioconf.c
2006-08-09 18:03:23 +00:00
cube 7aa6070d4e 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 :)
2005-10-01 23:30:37 +00:00
cube c130d400ba 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'.
2005-09-30 22:36:20 +00:00
drochner 0d6cb6f10c Replace the "locnames", attached to cfdata, which was solely good for
userconf, by more complete information (including default values) about
interface attributes, attached to the drivers which provide them.
2005-08-25 15:01:07 +00:00
drochner fd816c4745 don't put the xxxcf_locnames[] into the global namespace 2005-06-28 20:21:05 +00:00
thorpej 5ecc953bdb 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.
2005-06-05 18:19:52 +00:00