quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] [PATCH] backup-files.c fixes


From: Andreas Gruenbacher
Subject: Re: [Quilt-dev] [PATCH] backup-files.c fixes
Date: Wed, 25 Jan 2006 18:45:11 +0100
User-agent: KMail/1.8.2

On Wednesday 25 January 2006 06:59, Markus F.X.J. Oberhumer wrote:
> This small patch series fixes some issues with backup-files.c, including
> some minor bugs which might lead to data loss.
>
> The first patch makes some cleanups without functional changes,

This doesn't make sense to me. What's it good for?

+       (void) ftw; /* UNUSED */

I've left it out for now.

> while the second does contain the actual fixes. Please see the files for 
more info.

This change pattern is actually a change in behavior: When working with 
hardlinked trees, the source file already has a link count > 1. We don't care 
about the link count of the backup files, so link_or_copy_file makes sense 
even with opt_nolinks set.

-                       if (link_or_copy_file(backup, &st, file))
-                               goto fail;
                        if (opt_nolinks) {
+                               if (copy_file(backup, &st, file))
+                                       goto fail;
                                if (ensure_nolinks(file))
                                        goto fail;
+                       } else {
+                               if (link_or_copy_file(backup, &st, file))
+                                       goto fail;
+                       }

I'm leaving that out as well. All the other changes look good. Checking for 
EINTR won't actually have an effect unless we ignore signals as well, but it 
doesn't hurt.

Thank you very much for fixing all these things I've overlooked!

Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]