Systemd/src/journal/journald-gperf.gperf
Zbigniew Jędrzejewski-Szmek d025f1e4dc build-sys: store journald code in a noinst library
The point is to allow the use of journald functions by other binaries.
Before, journald code was split into multiple files (journald-*.[ch]),
but all those files all required functions from journald.c. And
journald.c has its own main(). Now, it is possible to link against
those functions, e.g. from test binaries.

This constitutes a fix for https://bugzilla.redhat.com/show_bug.cgi?id=872638.

The patch does the following:
1. rename journald.h to journald-server.h and move corresponding code
   to journald-server.c.
2. add journald-server.c and other journald-*.c parts to
   libsystemd-journal-internal.
3. remove journald-syslog.c from test_journal_syslog_SOURCES, since
   it is now contained in libsystemd-journal-internal.
There are no code changes, apart from the removal of a few static's,
to allow function calls between files.
2012-11-14 23:39:53 +01:00

40 lines
2.3 KiB
Plaintext

%{
#include <stddef.h>
#include <sys/socket.h>
#include "conf-parser.h"
#include "journald-server.h"
%}
struct ConfigPerfItem;
%null_strings
%language=ANSI-C
%define slot-name section_and_lvalue
%define hash-function-name journald_gperf_hash
%define lookup-function-name journald_gperf_lookup
%readonly-tables
%omit-struct-type
%struct-type
%includes
%%
Journal.Storage, config_parse_storage, 0, offsetof(Server, storage)
Journal.Compress, config_parse_bool, 0, offsetof(Server, compress)
Journal.Seal, config_parse_bool, 0, offsetof(Server, seal)
Journal.RateLimitInterval, config_parse_usec, 0, offsetof(Server, rate_limit_interval)
Journal.RateLimitBurst, config_parse_unsigned, 0, offsetof(Server, rate_limit_burst)
Journal.SystemMaxUse, config_parse_bytes_off, 0, offsetof(Server, system_metrics.max_use)
Journal.SystemMaxFileSize, config_parse_bytes_off, 0, offsetof(Server, system_metrics.max_size)
Journal.SystemKeepFree, config_parse_bytes_off, 0, offsetof(Server, system_metrics.keep_free)
Journal.RuntimeMaxUse, config_parse_bytes_off, 0, offsetof(Server, runtime_metrics.max_use)
Journal.RuntimeMaxFileSize, config_parse_bytes_off, 0, offsetof(Server, runtime_metrics.max_size)
Journal.RuntimeKeepFree, config_parse_bytes_off, 0, offsetof(Server, runtime_metrics.keep_free)
Journal.MaxRetentionSec, config_parse_usec, 0, offsetof(Server, max_retention_usec)
Journal.MaxFileSec, config_parse_usec, 0, offsetof(Server, max_file_usec)
Journal.ForwardToSyslog, config_parse_bool, 0, offsetof(Server, forward_to_syslog)
Journal.ForwardToKMsg, config_parse_bool, 0, offsetof(Server, forward_to_kmsg)
Journal.ForwardToConsole, config_parse_bool, 0, offsetof(Server, forward_to_console)
Journal.TTYPath, config_parse_path, 0, offsetof(Server, tty_path)
Journal.MaxLevelStore, config_parse_level, 0, offsetof(Server, max_level_store)
Journal.MaxLevelSyslog, config_parse_level, 0, offsetof(Server, max_level_syslog)
Journal.MaxLevelKMsg, config_parse_level, 0, offsetof(Server, max_level_kmsg)
Journal.MaxLevelConsole, config_parse_level, 0, offsetof(Server, max_level_console)
Journal.SplitMode, config_parse_split_mode,0, offsetof(Server, split_mode)