1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

a bunch of smaller changes and bug fixes

This commit is contained in:
Steffen Vogel 2017-08-23 16:51:15 +02:00
parent 06c7066285
commit 61de3b3274
4 changed files with 9 additions and 3 deletions

View file

@ -98,6 +98,7 @@ struct log {
int level;
long facilities; /**< Debug facilities used by the debug() macro. */
const char *path; /**< Path of the log file. */
char *prefix; /**< Prefix each line with this string. */
FILE *file; /**< Send all log output to this file / stdout / stderr. */
};

View file

@ -33,7 +33,7 @@ LIB_SRCS += $(addprefix lib/kernel/, kernel.c rt.c) \
utils.c super_node.c hist.c timing.c pool.c list.c queue.c \
queue_signalled.c memory.c advio.c plugin.c node_type.c stats.c \
mapping.c io.c shmem.c config_helper.c crypt.c compat.c \
log_table.c log_helper.c io_format.c periodic_task.c \
log_table.c log_helper.c io_format.c task.c \
)
LIB_LDFLAGS = -shared

View file

@ -75,9 +75,9 @@ int io_stream_open(struct io *io, const char *uri)
if (io->advio.output == NULL)
return -1;
io->advio.input = afopen(uri, "r");
io->advio.input = afopen(uri, "a+");
if (io->advio.input == NULL)
return -1;
return -2;
}
}
else {

View file

@ -27,11 +27,16 @@
int io_format_sscan(struct io_format *fmt, char *buf, size_t len, size_t *rbytes, struct sample *smps[], unsigned cnt, int *flags)
{
if (!flags)
flags = &fmt->flags;
return fmt->sscan ? fmt->sscan(buf, len, rbytes, smps, cnt, flags) : -1;
}
int io_format_sprint(struct io_format *fmt, char *buf, size_t len, size_t *wbytes, struct sample *smps[], unsigned cnt, int flags)
{
flags |= fmt->flags;
return fmt->sprint ? fmt->sprint(buf, len, wbytes, smps, cnt, flags) : -1;
}