search for: prev_file_display

Displaying 7 results from an estimated 7 matches for "prev_file_display".

Did you mean: prev_file_displayed
2016 Oct 11
1
Re: [PATCH v3 1/2] New tool: virt-tail.
.../* If we get here, the file changed and we're going to display > + * something. If there is more than one file, and the file > + * displayed is different from previously, then display the > + * filename banner. > + */ > + if (i != prev_file_displayed) > + printf ("\n\n--- %s ---\n\n", filename); > + prev_file_displayed = i; I'd simplify the check as "if (argc > 1)", and remove the "prev_file_displayed" variable (not used otherwise). > + /* Do nothing until something happen...
2016 Oct 03
3
[PATCH v3 0/2] New tool: virt-tail.
Since v2: - Fix the things that Pino mentioned, except the recursion. - Implement Windows support. For Windows support to be sane, I had to inline the add_and_mount code. Rich.
2016 Oct 03
3
[PATCH v2 0/2] New tool: virt-tail.
Nothing new in the virt-tail command itself, but the second commit includes a simple test. Rich.
2016 Oct 03
0
[PATCH v2 1/2] New tool: virt-tail.
...static void +user_cancel (int sig) +{ + quit = 1; + ignore_value (guestfs_user_cancel (g)); +} + +static int +do_tail (int argc, char *argv[], /* list of files in the guest */ + struct drv *drvs, struct mp *mps) +{ + struct sigaction sa; + time_t drvt; + int first_iteration = 1; + int prev_file_displayed = -1; + CLEANUP_FREE struct follow *file = NULL; + + /* Allocate storage to track each file. */ + file = calloc (argc, sizeof (struct follow)); + + /* We loop until the user hits ^C. */ + memset (&sa, 0, sizeof sa); + sa.sa_handler = user_cancel; + sa.sa_flags = SA_RESTART; + sigactio...
2016 Oct 01
1
[PATCH] New tool: virt-tail.
This adds a new tool which does a follow operation (ie. tail -f) on one or more log/text files inside the guest. I've only done limited testing, but it works for me for tailing various long-running builds inside guests which I'm doing at the moment. There are no tests at present. Rich.
2016 Oct 03
0
[PATCH v3 1/2] New tool: virt-tail.
...static void +user_cancel (int sig) +{ + quit = 1; + ignore_value (guestfs_user_cancel (g)); +} + +static int +do_tail (int argc, char *argv[], /* list of files in the guest */ + struct drv *drvs, struct mp *mps) +{ + struct sigaction sa; + time_t drvt; + int first_iteration = 1; + int prev_file_displayed = -1; + CLEANUP_FREE struct follow *file = NULL; + + /* Allocate storage to track each file. */ + file = calloc (argc, sizeof (struct follow)); + + /* We loop until the user hits ^C. */ + memset (&sa, 0, sizeof sa); + sa.sa_handler = user_cancel; + sa.sa_flags = SA_RESTART; + sigactio...
2016 Oct 03
1
Re: [PATCH v2 1/2] New tool: virt-tail.
...+ ignore_value (guestfs_user_cancel (g)); > +} > + > +static int > +do_tail (int argc, char *argv[], /* list of files in the guest */ > + struct drv *drvs, struct mp *mps) > +{ > + struct sigaction sa; > + time_t drvt; > + int first_iteration = 1; > + int prev_file_displayed = -1; > + CLEANUP_FREE struct follow *file = NULL; > + > + /* Allocate storage to track each file. */ > + file = calloc (argc, sizeof (struct follow)); > + > + /* We loop until the user hits ^C. */ > + memset (&sa, 0, sizeof sa); > + sa.sa_handler = user_cancel;...