diff options
author | Miles Bader <miles@gnu.org> | 1996-09-23 19:47:10 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-09-23 19:47:10 +0000 |
commit | e900bb91edbcf133c5af4babba7496c3f6ede83b (patch) | |
tree | db99f9f9626fe89f747ee22cf997f31465212fa6 /libnetfs | |
parent | 7aaedaccfab985b224eca563c8ddfd53c507ee37 (diff) |
(netfs_S_fsys_get_options):
Initialize ARGZ with the program name, and call netfs_append_args instead of
netfs_get_options.
Diffstat (limited to 'libnetfs')
-rw-r--r-- | libnetfs/fsys-get-options.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libnetfs/fsys-get-options.c b/libnetfs/fsys-get-options.c index 35c21d3a..3f873dbb 100644 --- a/libnetfs/fsys-get-options.c +++ b/libnetfs/fsys-get-options.c @@ -35,25 +35,31 @@ netfs_S_fsys_get_options (fsys_t fsys, char **data, mach_msg_type_number_t *data_len) { error_t err; - char *argz; - size_t argz_len; + char *argz = 0; + size_t argz_len = 0; struct port_info *port = ports_lookup_port (netfs_port_bucket, fsys, netfs_control_class); if (!port) return EOPNOTSUPP; + err = argz_add (&argz, &argz_len, program_invocation_name); + if (! err) + { #if NOT_YET - rwlock_reader_lock (&netfs_fsys_lock); + rwlock_reader_lock (&netfs_fsys_lock); #endif - err = netfs_get_options (&argz, &argz_len); + err = netfs_append_args (&argz, &argz_len); #if NOT_YET - rwlock_reader_unlock (&netfs_fsys_lock); + rwlock_reader_unlock (&netfs_fsys_lock); #endif + } if (! err) /* Move ARGZ from a malloced buffer into a vm_alloced one. */ err = fshelp_return_malloced_buffer (argz, argz_len, data, data_len); + else + free (argz); ports_port_deref (port); |