Commit 036f83b8 authored by Niels Möller's avatar Niels Möller
Browse files

* src/command.c (command_unimplemented): New command (which aborts

if called).

Rev: src/command.c:1.9
Rev: src/command.h:1.11
parent 22f06a61
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "connection.h" #include "connection.h"
#include "io.h" #include "io.h"
#include "werror.h"
#include "xalloc.h" #include "xalloc.h"
#define GABA_DEFINE #define GABA_DEFINE
...@@ -337,6 +338,21 @@ do_simple_command_B(struct command_simple *ignored UNUSED, ...@@ -337,6 +338,21 @@ do_simple_command_B(struct command_simple *ignored UNUSED,
struct command_simple command_B = STATIC_COMMAND_SIMPLE(do_simple_command_B); struct command_simple command_B = STATIC_COMMAND_SIMPLE(do_simple_command_B);
/* Unimplemented command */
static int
do_command_unimplemented(struct command *s UNUSED,
struct lsh_object *o UNUSED,
struct command_continuation *c UNUSED)
{ fatal("command.c: Unimplemented command.\n"); }
static struct lsh_object *
do_command_simple_unimplemented(struct command_simple *s UNUSED,
struct lsh_object *o UNUSED)
{ fatal("command.c: Unimplemented simple command.\n"); }
struct command_simple command_unimplemented =
{ { STATIC_HEADER, do_command_unimplemented}, do_command_simple_unimplemented};
/* Returned by listen */ /* Returned by listen */
/* GABA: /* GABA:
(class (class
......
...@@ -114,9 +114,10 @@ extern struct command_simple command_I; ...@@ -114,9 +114,10 @@ extern struct command_simple command_I;
#define GABA_VALUE_I (&command_I.super.super) #define GABA_VALUE_I (&command_I.super.super)
#define GABA_APPLY_I_1(x) (x) #define GABA_APPLY_I_1(x) (x)
#if 0 extern struct command_simple command_B;
extern struct command command_B;
#endif extern struct command_simple command_unimplemented;
#define COMMAND_UNIMPLEMENTED (&command_unimplemented.super.super)
struct command *make_listen_command(struct io_backend *backend, struct command *make_listen_command(struct io_backend *backend,
struct lsh_string *interface, struct lsh_string *interface,
......
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