From 1466e5f30d15777b318997dac68483ecc3b9df4d Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 20 Jun 1995 01:08:40 +0000 Subject: (diskfs_S_fsys_set_options): Use diskfs_node_iterate instead of fshelp_translator_iterate. --- libdiskfs/fsys-options.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'libdiskfs') diff --git a/libdiskfs/fsys-options.c b/libdiskfs/fsys-options.c index 4b8bae92..d5057814 100644 --- a/libdiskfs/fsys-options.c +++ b/libdiskfs/fsys-options.c @@ -36,16 +36,28 @@ diskfs_S_fsys_set_options (fsys_t fsys, struct port_info *pt = ports_lookup_port (diskfs_port_bucket, fsys, diskfs_control_class); int ret; - void dochild (struct trans_link *trans, void *arg __attribute__ ((unused))) - { - fsys_set_options (trans->control, data, len, do_children); - } + 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_set_options (control, data, len, do_children); + mach_port_deallocate (mach_task_self (), control); + } + else + error = 0; + return error; + } if (!pt) return EOPNOTSUPP; if (do_children) - fshelp_translator_iterate (dochild, 0); + diskfs_node_iterate (helper); argz_extract (data, len, argv); -- cgit v1.2.3