search for: 3axv

Displaying 11 results from an estimated 11 matches for "3axv".

2015 Mar 03
2
[PATCH v2] RFE: journal reader in guestfish
This implements new guestfish only command called journal-view. 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 now configurable, it's the same format as virt-log has, since both uses same code now. Maros Zatko (1): fish: add journal-view
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 Mar 05
0
[PATCH v3] fish: add journal-view command
...printf (" %s:", log_level_table[priority]); - - /* Message. */ - if (message) - printf (" %.*s", (int) message_len, message); - - printf ("\n"); - } - if (r == -1) /* error from guestfs_journal_next */ + if ((r = journal_view ("~3axv")) == -1) return -1; if (guestfs_journal_close (g) == -1) return -1; - return errors > 0 ? -1 : 0; + return r; } static int diff --git a/fish/Makefile.am b/fish/Makefile.am index c4b82ae..e4b4fcf 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -94,6 +94,7 @@ g...
2015 Mar 05
2
[PATCH v3] 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 now configurable, it's the same format as virt-log has, since both uses same code now. Maros Zatko (1): fish: add journal-view command cat/Makefile.am | 1 + cat/log.c | 113
2015 Aug 27
0
[PATCH v4 1/2] cat: move get_journal_field to fish/journal.c
...printf (" %s:", log_level_table[priority]); - - /* Message. */ - if (message) - printf (" %.*s", (int) message_len, message); - - printf ("\n"); - } - if (r == -1) /* error from guestfs_journal_next */ + if ((r = journal_view ("~3axv")) == -1) return -1; if (guestfs_journal_close (g) == -1) return -1; - return errors > 0 ? -1 : 0; + return r; } static int diff --git a/fish/Makefile.am b/fish/Makefile.am index c4b82ae..e4b4fcf 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -94,6 +94,7 @@ g...
2015 Mar 03
0
[PATCH v2] fish: add journal-view command
...printf (" %s:", log_level_table[priority]); - - /* Message. */ - if (message) - printf (" %.*s", (int) message_len, message); - - printf ("\n"); - } - if (r == -1) /* error from guestfs_journal_next */ + if (r = journal_view ("~3axv") == -1) return -1; if (guestfs_journal_close (g) == -1) return -1; - return errors > 0 ? -1 : 0; + return r; } static int diff --git a/fish/Makefile.am b/fish/Makefile.am index c4b82ae..e4b4fcf 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -94,6 +94,7 @@ gu...
2015 Aug 31
0
[PATCH v5 2/2] fish: add journal-view command (RHBZ#988100)
...@@ #include "guestfs.h" #include "options.h" +#include "journal.h" /* Currently open libguestfs handle. */ guestfs_h *g; @@ -279,6 +280,9 @@ do_log_journal (void) if (guestfs_journal_open (g, JOURNAL_DIR) == -1) return -1; + if (journal_view ("~3axv") == -1) + return -1; + if (guestfs_journal_close (g) == -1) return -1; diff --git a/fish/journal.c b/fish/journal.c index 9afdf60..579a1d1 100644 --- a/fish/journal.c +++ b/fish/journal.c @@ -83,9 +83,8 @@ lookup_field (char field) int journal_view (const char *fields) { - in...
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 1/2] cat: move get_journal_field to fish/journal.c
...okup_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; + while ((r = guestfs_journal_next(g)) > 0) { + CLEANUP_FREE_XATTR_LIST struct guestfs_xattr_list *xattrs = NULL; + int64_t ts; + int priority = LOG_INFO; + + xattrs = guestfs_journal_get (g); + if...
2015 Aug 27
0
[PATCH v4 2/2] fish: add journal-view command
...{ defaults with + name = "journal_view"; + shortdesc = "view journald log"; + longdesc = " journal-view [FORMAT] + +View journald log in format similar to journalctl. + +=over + +" +^ (Journal.ops_to_pod_string ()) ^ +" +=back + +Default format is C<~3axv> + +For fields description see C<man SYSTEMD.JOURNAL-FIELDS> + +Use C<journal-open> first." }; + + { defaults with name = "lcd"; shortdesc = "change working directory"; longdesc = " lcd directory diff --git a/generator/main.ml b/generator...