diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-06-20 01:08:40 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-06-20 01:08:40 +0000 |
commit | 1466e5f30d15777b318997dac68483ecc3b9df4d (patch) | |
tree | 0228b90ec27b7187a16d4a49b5ed42687e67708e | |
parent | db41827b9d0a0f91b93a15dc0f604c268dcac646 (diff) |
(diskfs_S_fsys_set_options): Use diskfs_node_iterate instead of
fshelp_translator_iterate.
-rw-r--r-- | libdiskfs/fsys-options.c | 22 |
1 files changed, 17 insertions, 5 deletions
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); |