Commit Graph

14 Commits

Author SHA1 Message Date
cube 7b7c582a4f Introduce two new statements:
no device at <attachment>

     <attachment> can take two forms:  either numbered/wildcarded, in which
     case only exactly matching instances will be removed, or plain (with
     no number or wildcard), in which case all matching instances will be
     removed.

     When <attachment> is a plain interface attribute, all instances using
     that attribute (either directly or through an explicit device) will be
     removed.

     E.g.:
             auich* at pci? dev ? function ?
             audio0 at audiobus?
             audio1 at auich?
             audio* at auich0

             no device at auich0     -> removes audio*
             no device at auich?     -> removes audio1
             no device at auich      -> removes audio1 _and_ audio*
             no device at audiobus?  -> removes audio0
             no device at audiobus   -> removes audio0, audio1 and audio*

  no <device>

     As in the previous case, <device> can either be numbered/starred, in
     which case all exactly matching instances are removed, or plain, in
     which case all instances of the device are removed.

    E.g.: (continuing previous example)

             no audio* -> removes 'audio* at auich0'
             no audio  -> removes all audio instances
2005-09-30 22:51:46 +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
martin 6fd5c01546 Move package/cinclude/include handling from the parser to the scanner,
where it belongs. This has the side effect of fixing PR toolchain/30903.
2005-09-10 15:38:46 +00:00
drochner f46880afbf in locators.h, also emit definitions about the number of locators per
interface attribute
2005-08-25 15:02:18 +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
cube 3b40577510 - Make sure devitab is correctly handled, in case we're removing the entry
it contains,
- Properly update the d_ihead list:  if we have remaining aliases, use them
  to fill in the gap

Thanks to Bernd Ernesti for the test cases.
2005-08-07 15:11:12 +00:00
yamt 19ff568b84 allow configuration without swap. 2005-07-30 06:40:30 +00:00
cube c3414672de The devi lists in struct devbase and struct deva really should use the
TAILQ set of macros from queue.h...  It's way too easy to make mistakes...

config(1) was segfaulting in deldev() in some situations...  Reported by
Brend Ernesti.
2005-07-25 22:31:07 +00:00
cube 878c29f51a Correct an if test. 2005-07-25 06:22:09 +00:00
cube e499d8b53e Implement the long overdue syntax "no <dev> at <attachment>". We can't
pretend anymore we don't have it.

This is the result of 7 hours of work on the train journey forth and
back to the family reunion for the birthday of my cousin Mickael, whom
I thank for living just far away enough.
2005-07-24 21:31:02 +00:00
drochner fd816c4745 don't put the xxxcf_locnames[] into the global namespace 2005-06-28 20:21:05 +00:00
thorpej dbe5d1e1f7 Remove bogus BINDIR assignment. 2005-06-06 06:12:09 +00:00
wiz d3918ffef7 config(1), not (8) 2005-06-05 18:59:35 +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