Displaying 3 results from an estimated 3 matches for "output_end_line".
2014 Dec 15
2
(no subject)
Hi,
I noticed the diff wasn't showing the "-" at the start of a deleted file
and the details of the second file when attributes are different.
This change should fix them.
thanks.
2014 Dec 15
0
[PATCH] diff/diff.c: diff output to show correct file handles and presence symbol
...--git a/diff/diff.c b/diff/diff.c
index 8b0fda0..6a374af 100644
--- a/diff/diff.c
+++ b/diff/diff.c
@@ -608,7 +608,7 @@ static void
deleted (guestfs_h *g, struct file *file)
{
output_start_line ();
- output_string ("+");
+ output_string ("-");
output_file (g, file);
output_end_line ();
}
@@ -669,7 +669,7 @@ changed (guestfs_h *g1, struct file *file1,
output_end_line ();
output_start_line ();
output_string ("+");
- output_file (g1, file1);
+ output_file (g2, file2);
output_end_line ();
/* Display stats fields that changed. */
--
1.9...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...id)
field++;
if (field == 1) return;
- if (putchar (c) == EOF) {
- perror ("putchar");
- exit (EXIT_FAILURE);
- }
+ if (putchar (c) == EOF)
+ error (EXIT_FAILURE, errno, "putchar");
}
static void
@@ -579,10 +572,8 @@ output_start_line (void)
static void
output_end_line (void)
{
- if (printf ("\n") < 0) {
- perror ("printf");
- exit (EXIT_FAILURE);
- }
+ if (printf ("\n") < 0)
+ error (EXIT_FAILURE, errno, "printf");
}
static void
@@ -592,10 +583,8 @@ output_string (const char *s)
if (!csv) {
p...