diff options
author | Miles Bader <miles@gnu.org> | 1996-09-23 16:48:39 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-09-23 16:48:39 +0000 |
commit | b0a5e83c1b78bda82bc3424412364c740dabaaac (patch) | |
tree | 60251eed714575aef5cd1a5860e4e6d1ad2c1876 /libtrivfs/file-get-fs-options.c | |
parent | 10e69a4034a954d496bd126819bab8608df51a21 (diff) |
(trivfs_S_file_get_fs_options):
Initialize ARGZ with the program name, and call trivfs_append_args instead
of trivfs_get_options.
Diffstat (limited to 'libtrivfs/file-get-fs-options.c')
-rw-r--r-- | libtrivfs/file-get-fs-options.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libtrivfs/file-get-fs-options.c b/libtrivfs/file-get-fs-options.c index de887ca5..5f0a49b5 100644 --- a/libtrivfs/file-get-fs-options.c +++ b/libtrivfs/file-get-fs-options.c @@ -30,16 +30,22 @@ trivfs_S_file_get_fs_options (struct trivfs_protid *cred, char **data, mach_msg_type_number_t *len) { error_t err; - char *argz; - size_t argz_len; + char *argz = 0; + size_t argz_len = 0; if (! cred) return EOPNOTSUPP; - err = trivfs_get_options (cred->po->cntl, &argz, &argz_len); + err = argz_add (&argz, &argz_len, program_invocation_name); + if (err) + return err; + + err = trivfs_append_args (cred->po->cntl, &argz, &argz_len); if (! err) /* Put ARGZ into vm_alloced memory for the return trip. */ err = fshelp_return_malloced_buffer (argz, argz_len, data, len); + else + free (argz); return err; } |