DEVFS - Factor out recursive code into iterate_topology
authorAlex Hornung <ahornung@gmail.com>
Sat, 8 Aug 2009 16:42:02 +0000 (17:42 +0100)
committerAlex Hornung <ahornung@gmail.com>
Sat, 8 Aug 2009 17:38:05 +0000 (18:38 +0100)
commit66abefa5a42a0b63ca3bb1fbb1601c3955401681
tree6a549e7a13b2f059d736692f57574089aa79fb85
parent80860e325a3cb8f801d90a624c18f62ab4b909fa
DEVFS - Factor out recursive code into iterate_topology

* Factor out the recursive code which scans through all nodes in
  the topology into a function, devfs_iterate_topology, which takes
  a callback as argument, which is called for every node.

* Create new callback functions for all functions that were recursive
  before, containing the code that was executed for each node.

* Change all callers of recursive functions to call
  devfs_iterate_topology with the respective callback function
  instead of having their own recursive functions.
sys/vfs/devfs/devfs.h
sys/vfs/devfs/devfs_core.c
sys/vfs/devfs/devfs_rules.c
sys/vfs/devfs/devfs_rules.h