Pino Toscano
2014-Jul-30 15:36 UTC
[Libguestfs] [PATCH 3/3] ext2: print every file being copied
Print every file copied by supermin, so it is easier to spot whether some file causes troubles to supermin (e.g. what happens in RHBZ#1099172). Since the resulting output is huge, make it valid for debug level 3. --- src/ext2fs-c.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ext2fs-c.c b/src/ext2fs-c.c index c9d3994..9e0770a 100644 --- a/src/ext2fs-c.c +++ b/src/ext2fs-c.c @@ -554,6 +554,9 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) struct stat statbuf; struct statvfs statvfsbuf; + if (data->debug >= 3) + printf ("supermin: ext2: copy_file %s -> %s\n", src, dest); + if (lstat (src, &statbuf) == -1) unix_error (errno, (char *) "lstat", caml_copy_string (src)); @@ -570,11 +573,6 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) caml_copy_string (data->fs->device_name)); } -#if 0 - /* if debug >= 3 */ - fprintf (stderr, "ext2_copy_file %s %s 0%o\n", src, dest, statbuf.st_mode); -#endif - /* Sanity check the path. These rules are always true for the paths * passed to us here from the appliance layer. The assertions just * verify that the rules haven't changed. -- 1.9.3