diff options
author | Miles Bader <miles@gnu.org> | 1996-09-23 19:47:03 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-09-23 19:47:03 +0000 |
commit | 14d11b16758e57c41a7589bc3de29c6c4ee9081f (patch) | |
tree | 9c453d6cc2f4981780315aa5f2c9a6ac26c91758 /libnetfs | |
parent | fdef1a17e03a0bbdc4718d1c26c07356e94fb850 (diff) |
(netfs_S_file_get_fs_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/file-get-fs-options.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libnetfs/file-get-fs-options.c b/libnetfs/file-get-fs-options.c index 8d4af76b..bd4c91e8 100644 --- a/libnetfs/file-get-fs-options.c +++ b/libnetfs/file-get-fs-options.c @@ -34,23 +34,29 @@ netfs_S_file_get_fs_options (struct protid *user, 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; if (! user) 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); return err; } |