diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-09-07 22:09:41 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-09-07 22:09:41 -0400 |
commit | 97e3ae756fc27548a78a7c9d9759c5d096f3afe6 (patch) | |
tree | 2820ece5e2d3a6b061d43edbb0783d4b88c64f67 /src/libshared/src/output-mode.c | |
parent | 679bea0d0993ccd497b56f3467fe5ad4d893b680 (diff) |
./move.sh
Diffstat (limited to 'src/libshared/src/output-mode.c')
-rw-r--r-- | src/libshared/src/output-mode.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/libshared/src/output-mode.c b/src/libshared/src/output-mode.c new file mode 100644 index 0000000000..bec53ee0ae --- /dev/null +++ b/src/libshared/src/output-mode.c @@ -0,0 +1,37 @@ +/*** + This file is part of systemd. + + Copyright 2012 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see <http://www.gnu.org/licenses/>. +***/ + +#include "output-mode.h" +#include "string-table.h" + +static const char *const output_mode_table[_OUTPUT_MODE_MAX] = { + [OUTPUT_SHORT] = "short", + [OUTPUT_SHORT_ISO] = "short-iso", + [OUTPUT_SHORT_PRECISE] = "short-precise", + [OUTPUT_SHORT_MONOTONIC] = "short-monotonic", + [OUTPUT_SHORT_UNIX] = "short-unix", + [OUTPUT_VERBOSE] = "verbose", + [OUTPUT_EXPORT] = "export", + [OUTPUT_JSON] = "json", + [OUTPUT_JSON_PRETTY] = "json-pretty", + [OUTPUT_JSON_SSE] = "json-sse", + [OUTPUT_CAT] = "cat" +}; + +DEFINE_STRING_TABLE_LOOKUP(output_mode, OutputMode); |