Commit 29dd39e3 authored by Niels Möller's avatar Niels Möller
Browse files

* src/lsh-writekey.c (make_writekey): Chenged order of options and

stdin arguments. Delay call of read_sexp.

Rev: src/lsh-writekey.c:1.17
parent 9953cf3b
......@@ -411,10 +411,12 @@ DEFINE_COMMAND(lsh_writekey_options2private_file)
(expr
(name make_writekey)
(params
(options object lsh_writekey_options))
(stdin object lsh_fd))
(expr
(lambda (stdin)
(let ((key (read_sexp stdin)))
(lambda (options)
(let ((key (read_sexp
; Delay reading a little
(prog1 stdin options))))
(prog1 (print_public options
(io_write_file (options2public_file options))
(verifier2public
......@@ -476,10 +478,9 @@ int main(int argc, char **argv)
{
CAST_SUBTYPE
(command, work,
make_writekey(options));
make_writekey(make_lsh_fd(STDIN_FILENO, "stdin", &exc_handler)));
COMMAND_CALL(work,
make_lsh_fd(STDIN_FILENO, "stdin", &exc_handler),
COMMAND_CALL(work, options,
&discard_continuation, &exc_handler);
}
io_run();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment