Pino Toscano
2014-Oct-14 09:10 UTC
[Libguestfs] [PATCH] diff: do not pad uid/gid in CSV mode
--- diff/diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diff/diff.c b/diff/diff.c index f4b25e9..ad371b0 100644 --- a/diff/diff.c +++ b/diff/diff.c @@ -1108,7 +1108,7 @@ output_int64_uid (int64_t i) { next_field (); /* csv doesn't need escaping */ - if (printf ("%4" PRIi64, i) < 0) { + if (printf (csv ? "%" PRIi64 : "%4" PRIi64, i) < 0) { perror ("printf"); exit (EXIT_FAILURE); } -- 1.9.3
Richard W.M. Jones
2014-Oct-20 09:07 UTC
Re: [Libguestfs] [PATCH] diff: do not pad uid/gid in CSV mode
On Tue, Oct 14, 2014 at 11:10:22AM +0200, Pino Toscano wrote:> --- > diff/diff.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/diff/diff.c b/diff/diff.c > index f4b25e9..ad371b0 100644 > --- a/diff/diff.c > +++ b/diff/diff.c > @@ -1108,7 +1108,7 @@ output_int64_uid (int64_t i) > { > next_field (); > /* csv doesn't need escaping */ > - if (printf ("%4" PRIi64, i) < 0) { > + if (printf (csv ? "%" PRIi64 : "%4" PRIi64, i) < 0) { > perror ("printf"); > exit (EXIT_FAILURE); > } > -- > 1.9.3Thanks - I will push all 3 patches shortly. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Apparently Analagous Threads
- [PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
- [PATCH] virt-diff: add additional ignore options
- [PATCH] virt-diff: add additional ignore options
- [PATCH 1/2] Use 'error' function consistently throughout.
- [PATCH] sleuthkit code cleanup