看板 DFBSD_commit 關於我們 聯絡資訊
commit 66abefa5a42a0b63ca3bb1fbb1601c3955401681 Author: Alex Hornung <ahornung@gmail.com> Date: Sat Aug 8 17:42:02 2009 +0100 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. Summary of changes: sys/vfs/devfs/devfs.h | 8 ++- sys/vfs/devfs/devfs_core.c | 201 +++++++++++++++--------------------------- sys/vfs/devfs/devfs_rules.c | 14 ++-- sys/vfs/devfs/devfs_rules.h | 6 +- 4 files changed, 88 insertions(+), 141 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/66abefa5a42a0b63ca3bb1fbb1601c3955401681 -- DragonFly BSD source repository