diff options
author | Miles Bader <miles@gnu.org> | 1996-09-23 19:51:47 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-09-23 19:51:47 +0000 |
commit | fd6ee5806bb576f286051e1f3c21eda3cf318f26 (patch) | |
tree | 225cb7ab0d0760872908a9a5acf6ae76b8f012a2 /nfs | |
parent | 4175eb6eae8048feb9e6783e3eebd84046bc7feb (diff) |
(hold):
Variable removed.
(netfs_append_args):
Renamed from netfs_get_options.
Don't initialize ARGZ & ARGZ_LEN anymore.
Add remote filesystem spec to output.
(main):
Don't use HOLD anymore.
Diffstat (limited to 'nfs')
-rw-r--r-- | nfs/main.c | 26 |
1 files changed, 9 insertions, 17 deletions
@@ -183,18 +183,19 @@ runtime_argp = { common_options, parse_common_opt, 0, 0, runtime_argp_parents }; /* Use by netfs_set_options to handle runtime option parsing. */ struct argp *netfs_runtime_argp = &runtime_argp; +/* Where to find the remote filesystem. */ +static char *remote_fs = 0; +static char *host = 0; + /* Return an argz string describing the current options. Fill *ARGZ with a pointer to newly malloced storage holding the list and *LEN to the length of that storage. */ error_t -netfs_get_options (char **argz, size_t *argz_len) +netfs_append_args (char **argz, size_t *argz_len) { char buf[80]; error_t err = 0; - *argz = 0; - *argz_len = 0; - #define FOPT(fmt, arg) \ do { \ if (! err) \ @@ -220,8 +221,10 @@ netfs_get_options (char **argz, size_t *argz_len) if (! err) err = netfs_append_std_options (argz, argz_len); - if (err) - free (argz); + if (! err) + err = argz_add (argz, argz_len, remote_fs); + if (! err) + err = argz_add (argz, argz_len, host); return err; } @@ -259,13 +262,6 @@ extract_nfs_args (char *spec, char **remote_fs, char **host) return 0; } -/* Where to find the remote filesystem. */ -static char *remote_fs = 0; -static char *host = 0; - -/* For debugging. */ -static volatile int hold = 0; - static error_t parse_startup_opt (int key, char *arg, struct argp_state *state) { @@ -285,8 +281,6 @@ parse_startup_opt (int key, char *arg, struct argp_state *state) nfs_port = atoi (arg); break; - case OPT_HOLD: hold = 1; break; - case ARGP_KEY_ARG: if (state->arg_num == 0) remote_fs = arg; @@ -325,8 +319,6 @@ main (int argc, char **argv) int ret; argp_parse (&argp, argc, argv, 0, 0, 0); - - while (hold); task_get_bootstrap_port (mach_task_self (), &bootstrap); netfs_init (); |