Commit 860f97e5 authored by Niels Möller's avatar Niels Möller
Browse files

* src/io_commands.h (io_write_file_info): Deleted class.

* src/io_commands.c (io_write_file_command)
(make_io_write_file_info): Deleted unused functions.

Rev: src/io_commands.c:1.64
Rev: src/io_commands.h:1.33
parent 1562ba0a
......@@ -42,10 +42,6 @@
#include "xalloc.h"
#define GABA_DEFINE
#include "io_commands.h.x"
#undef GABA_DEFINE
#if WITH_TCPWRAPPERS
#include <tcpd.h>
......@@ -59,47 +55,6 @@ int deny_severity = LOG_INFO;
#include "io_commands.c.x"
/* Used only by lsh-writekey */
/* FIXME: Are these still used? */
/* (write file_info)
*
* Opens a file for write, and returns the corresponding write_buffer.
* */
DEFINE_COMMAND(io_write_file_command)
(struct command *s UNUSED,
struct lsh_object *a,
struct command_continuation *c,
struct exception_handler *e)
{
CAST(io_write_file_info, info, a);
struct lsh_fd *fd = io_write_file(lsh_get_cstring(info->name),
info->flags,
info->mode,
info->block_size,
NULL,
e);
if (fd)
COMMAND_RETURN(c, fd->write_buffer);
else
EXCEPTION_RAISE(e, make_io_exception(EXC_IO_OPEN_WRITE, NULL, errno, NULL));
}
struct io_write_file_info *
make_io_write_file_info(struct lsh_string *name,
int flags, int mode, uint32_t block_size)
{
NEW(io_write_file_info, self);
self->name = name;
self->flags = flags;
self->mode = mode;
self->block_size = block_size;
return self;
}
/* (listen callback fd) */
DEFINE_COMMAND2(listen_command)
(struct command_2 *s UNUSED,
......
......@@ -27,27 +27,6 @@
#include "connection.h"
#include "io.h"
#define GABA_DECLARE
#include "io_commands.h.x"
#undef GABA_DECLARE
/* GABA:
(class
(name io_write_file_info)
(vars
(name string)
(flags . int)
(mode . int)
(block_size . uint32_t)))
*/
struct io_write_file_info *
make_io_write_file_info(struct lsh_string *name, int flags, int mode, uint32_t block_size);
extern struct command io_write_file_command;
#define IO_WRITE_FILE (&io_write_file_command.super)
extern struct command_2 listen_command;
#define LISTEN (&listen_command.super.super)
......
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