summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-06-20 01:04:30 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-06-20 01:04:30 +0000
commita1712f9f6ba240fed9bce7d8d032f0e599b848ce (patch)
tree598db18a00f33d0a9de2d07b08f03caf476975d9 /libdiskfs
parentfaf6883b33737fb03437373cd93d469864409234 (diff)
(diskfs_shutdown): Use diskfs_node_iterate instead of
diskfs_translator_iterate.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/shutdown.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/libdiskfs/shutdown.c b/libdiskfs/shutdown.c
index a385460b..1dfeeb99 100644
--- a/libdiskfs/shutdown.c
+++ b/libdiskfs/shutdown.c
@@ -31,17 +31,29 @@ diskfs_shutdown (int flags)
int nports = -1;
int err;
- void sync_trans (struct trans_link *trans, void *arg)
- {
- fsys_goaway (trans->control, (int) arg);
- }
+ error_t
+ helper (struct node *np)
+ {
+ error_t error;
+ mach_port_t control;
+
+ error = fshelp_fetch_control (np, &control);
+ if (!error && (control != MACH_PORT_NULL))
+ {
+ error = fsys_goaway (control, flags);
+ mach_port_deallocate (mach_task_self (), control);
+ }
+ else
+ error = 0;
+ return error;
+ }
if ((flags & FSYS_GOAWAY_UNLINK)
&& S_ISDIR (diskfs_root_node->dn_stat.st_mode))
return EBUSY;
if (flags & FSYS_GOAWAY_RECURSE)
- fshelp_translator_iterate (sync_trans, (void *)flags);
+ diskfs_node_iterate (helper);
mutex_lock (&diskfs_shutdown_lock);