Commit d38ae8be authored by Niels Möller's avatar Niels Möller

* src/lsh-decode-key.c (main): Use make_io_backend().

* src/lsh.c (main): Likewise.
* src/lsh-writekey.c (main): Likewise.
* src/lsh-export-key.c (main): Likewise.

Rev: src/lsh-decode-key.c:1.6
Rev: src/lsh-export-key.c:1.5
Rev: src/lsh-writekey.c:1.7
Rev: src/lsh.c:1.122
parent 9723db64
......@@ -207,15 +207,13 @@ STATIC_EXCEPTION_HANDLER(do_exc_lsh_decode_key, NULL);
int main(int argc, char **argv)
{
NEW(io_backend, backend);
struct io_backend *backend = make_io_backend();
struct lsh_decode_key_options *options = make_lsh_decode_key_options();
struct exception_handler *e;
struct lsh_fd *in;
struct lsh_fd *out;
init_backend(backend);
argp_parse(&main_argp, argc, argv, 0, NULL, options);
in = make_lsh_fd(backend, STDIN_FILENO, &exc_handler);
......
......@@ -361,12 +361,10 @@ int main(int argc, char **argv)
struct lsh_fd *in;
struct lsh_fd *out;
NEW(io_backend, backend);
struct io_backend *backend = make_io_backend();
argp_parse(&main_argp, argc, argv, 0, NULL, options);
init_backend(backend);
/* Patch the parent pointer later */
e = make_exception_handler(do_exc_export_key_handler,
NULL, HANDLER_CONTEXT);
......
......@@ -432,13 +432,11 @@ STATIC_EXCEPTION_HANDLER(do_lsh_writekey_handler, NULL);
int main(int argc, char **argv)
{
NEW(io_backend, backend);
struct io_backend *backend = make_io_backend();
struct lsh_writekey_options *options = make_lsh_writekey_options();
argp_parse(&main_argp, argc, argv, 0, NULL, options);
init_backend(backend);
{
CAST_SUBTYPE
(command, work,
......
......@@ -42,6 +42,7 @@
#include "io_commands.h"
#include "gateway.h"
#include "gateway_commands.h"
#include "handshake.h"
#include "lookup_verifier.h"
#include "randomness.h"
#include "service.h"
......@@ -1437,8 +1438,7 @@ int main(int argc, char **argv)
= make_lsh_default_handler(&lsh_exit_code, &default_exception_handler,
HANDLER_CONTEXT);
NEW(io_backend, backend);
init_backend(backend);
struct io_backend *backend = make_io_backend();
/* Attempt to open a tty */
lsh_open_tty();
......
Markdown is supported
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