search for: journal_fields

Displaying 6 results from an estimated 6 matches for "journal_fields".

2015 Aug 31
0
[PATCH v5 1/2] cat: move get_journal_field to fish/journal.c
..."crit", + [LOG_ERR] = "err", + [LOG_WARNING] = "warning", + [LOG_NOTICE] = "notice", + [LOG_INFO] = "info", + [LOG_DEBUG] = "debug" +}; + +static const char * +lookup_field (char field) +{ + size_t i = 0; + for (i = 0; i < sizeof journal_fields / sizeof *journal_fields; i += 2) { + if (field == journal_fields[i][0]) + return journal_fields[i+1]; + } + return NULL; +} + +/* Fetch and print journal fields in specified order + * default is '~3axv' + */ +int +journal_view (const char *fields) +{ + int r; + int errors = 0;...
2015 Aug 27
0
[PATCH v4 1/2] cat: move get_journal_field to fish/journal.c
..."crit", + [LOG_ERR] = "err", + [LOG_WARNING] = "warning", + [LOG_NOTICE] = "notice", + [LOG_INFO] = "info", + [LOG_DEBUG] = "debug" +}; + +static const char * +lookup_field (char field) +{ + size_t i = 0; + for (i = 0; i < sizeof journal_fields / sizeof *journal_fields; i += 2) { + if (field == journal_fields[i][0]) + return journal_fields[i+1]; + } + return NULL; +} + +/* Fetch and print journal fields in specified order + * default is '~3axv' + */ +int +journal_view (const char *fields) +{ + int r; + int errors = 0;...
2015 Aug 27
4
[PATCH v4 0/2] RFE: journal reader in guestfish
There seems to be a minor issue when user wants to run it through pager (more) and wants cancel it. User will end up with stuck guestfish until journal-view transfers all journal items. Output is configurable, it's the same format as virt-log has, since both uses same code. Maros Zatko (2): cat: move get_journal_field to fish/journal.c fish: add journal-view command cat/Makefile.am
2015 Aug 31
5
[PATCH v5 0/2] RFE: journal reader in guestfish
There seems to be a minor issue when user wants to run it through pager (more) and wants cancel it. User will end up with stuck guestfish until journal-view transfers all journal items. Output is configurable, it's the same format as virt-log has, since both uses same code. Maros Zatko (2): cat: move get_journal_field to fish/journal.c fish: add journal-view command (RHBZ#988100)
2015 Oct 16
2
[PATCH v6 0/2] RFE: journal reader in guestfish
Output is configurable, it's the same format as virt-log has, since both uses same code. First patch moves get_journal_field around and renames it to journal_view and the next one reimplements it a bit and brings it to guestfish. Maros Zatko (2): cat: move get_journal_field to fish/journal.c fish: add journal-view command (RHBZ#988100) .gnulib | 2 +-
2015 Aug 31
0
[PATCH v5 2/2] fish: add journal-view command (RHBZ#988100)
...uot;\n};";; + +let generate_journal_h () = + generate_header CStyle LGPLv2plus; + pr "#include <config.h>\n"; + pr "\n"; + pr "#ifndef JOURNAL_H\n"; + pr "#define JOURNAL_H\n"; + pr "\n"; + pr "%s\n" (ops_to_c_array "journal_fields" ()); + pr "\n"; + pr "/* in journal.c */\n"; + pr "extern int journal_view (const char *fields);\n"; + pr "#endif /* JOURNAL_H */\n"; diff --git a/generator/main.ml b/generator/main.ml index 1e0e7d6..639920d 100644 --- a/generator/main.ml +++ b/gene...