search for: compare_stat

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

2014 Sep 22
2
[PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
...hname and stats to the list. */ i = t->nr_files++; @@ -535,7 +536,7 @@ visit_entry (const char *dir, const char *name, error: free (path); free (csum); - guestfs_free_stat (stat); + guestfs_free_statns (stat); guestfs_free_xattr_list (xattrs); return -1; } @@ -622,7 +623,7 @@ compare_stats (struct file *file1, struct file *file2) { int r; - r = guestfs_compare_stat (file1->stat, file2->stat); + r = guestfs_compare_statns (file1->stat, file2->stat); if (r != 0) return r; @@ -640,10 +641,10 @@ changed (guestfs_h *g1, struct file *file1, { /* Did file...
2015 Jan 05
2
Re: [PATCH] virt-diff: add additional ignore options
...quot;); > goto error; > } > + if (no_compare_xattrs) > + xattrs->len = 0; "len" in _list structs indicates the number of items in the list itself, so I'd avoid resetting it to 0 otherwise this information is lost. Much better to check (no_)compare_xattrs in compare_stats. Even better, if the xattrs comparison is off, then just avoid copying xattrs_orig. > if (checksum && is_reg (stat->st_mode)) { > csum = guestfs_checksum (t->g, checksum, path); > @@ -534,6 +581,8 @@ visit_entry (const char *dir, const char *name, > t->file...
2015 Jan 06
0
Re: [PATCH] virt-diff: add additional ignore options
...d be the name of the argument to show all the compare=False informations ? > > "len" in _list structs indicates the number of items in the list > itself, so I'd avoid resetting it to 0 otherwise this information is > lost. > Much better to check (no_)compare_xattrs in compare_stats. > Even better, if the xattrs comparison is off, then just avoid copying > xattrs_orig. > what is the problem if the information is lost ? there's the same information in xattrs_orig. Anyway, the second proposal is feasible but not similar to the strategies for others "ignore f...
2015 Jan 06
0
[PATCH] virt-diff: add additional ignore options
...f (!csum) @@ -534,6 +585,8 @@ visit_entry (const char *dir, const char *name, t->files[i].stat = stat; t->files[i].xattrs = xattrs; t->files[i].csum = csum; + t->files[i].stat_orig = stat_copy; + t->files[i].xattrs_orig = xattrs_copy; return 0; @@ -631,10 +684,11 @@ compare_stats (struct file *file1, struct file *file2) if (r != 0) return r; - r = guestfs_compare_xattr_list (file1->xattrs, file2->xattrs); - if (r != 0) - return r; - + if (compare_xattrs) { + r = guestfs_compare_xattr_list (file1->xattrs, file2->xattrs); + if (r != 0) +...
2015 Jan 02
2
(no subject)
Hi, we needed these changes when we had to build a guest image compatible with a starting guest image but not backed by it in any way? We needed some tool to check our progress, comparing original and? rebuilt (from scratch) images, and virt-diff seemed the best option, but? we had to soften the comparison to reduce the noise in the output. I added some options to ignore certain informations when
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
..., + long_options[option_index].name, option_index); exit (EXIT_FAILURE); } break; @@ -675,7 +676,7 @@ changed (guestfs_h *g1, struct file *file1, output_start_line (); output_string ("#"); output_string ("changed:"); -#define COMPARE_STAT(n) \ +#define COMPARE_STAT(n) \ if (file1->stat->n != file2->stat->n) output_string (#n) COMPARE_STAT (st_dev); COMPARE_STAT (st_ino); diff --git a/edit/edit.c b/edit/edit.c index 9df99c3..a2a83ce 100644 --- a/edit/edit.c +++ b/edit/edit.c @@ -84,8 +84,8 @@ usage (in...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67