summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-02-21 21:50:17 +0000
committerMiles Bader <miles@gnu.org>1997-02-21 21:50:17 +0000
commitc3adc4a61a1fd0ce270f250248ddab7ca4de6240 (patch)
tree424e53c844a2d6426445e7fcbbf586c021367664
parent1a81cc76d14d2e566b764359fc4a96e6420afba1 (diff)
(netfs_append_args):
Present the remote filesystem as a single argument, in HOST:FS format.
-rw-r--r--nfs/main.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/nfs/main.c b/nfs/main.c
index 271453a6..38e0124f 100644
--- a/nfs/main.c
+++ b/nfs/main.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -224,9 +224,16 @@ netfs_append_args (char **argz, size_t *argz_len)
err = netfs_append_std_options (argz, argz_len);
if (! err)
- err = argz_add (argz, argz_len, remote_fs);
- if (! err)
- err = argz_add (argz, argz_len, host);
+ {
+ char *fs;
+ if (asprintf (&fs, "%s:%s", host, remote_fs))
+ {
+ err = argz_add (argz, argz_len, fs);
+ free (fs);
+ }
+ else
+ err = ENOMEM;
+ }
return err;
}