quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] [patch 3/8] Unmerged patches regenerated against CVS HEA


From: John Vandenberg
Subject: Re: [Quilt-dev] [patch 3/8] Unmerged patches regenerated against CVS HEAD
Date: Fri, 23 Sep 2005 06:19:38 +1000

On 9/22/05, Gary V. Vaughan <address@hidden> wrote:
> Although Mac OS X 10.4 (I'm running 10.4.2) has nftw and ftw compatibility
> functions, and code that uses them seems to build and link properly: the
> resulting calls do nothing, which breaks `quilt pop' at least.
>
> This patch reimplements the file tree walk manually with dirent, which is
> fully supported even on old host architectures.
>
>  lib/backup-files.c |   95 
> ++++++++++++++++++++++++++++++++++++++++++++++-------
>  1 files changed, 83 insertions(+), 12 deletions(-)
>
> ...
> @@ -450,13 +518,16 @@ main(int argc, char *argv[])
>         }
>         for (; optind < argc; optind++) {
>                 if (strcmp(argv[optind], "-") == 0) {
> -                       char *dir = strdup(opt_prefix), *d = strrchr(dir, 
> '/');
> +                       char *dir, *d;
> +
> +                       dir = strdup(opt_prefix);
> +                       d = strrchr(dir, '/');
>                         if (d)
> -                               *(d+1) = '\0';
> +                               *d = '\0';
>                         else
>                                 d = ".";
> -                       status = nftw(dir, walk, 0, 0);
> -                       free(dir);
> +
> +                       foreachdir (dir, ftwalk);
>                 } else
>                         status = process_file(argv[optind]);
>                 if (status)

It looks like this drops the status, which means it wont play nice
with the scripts in the cause of an unexpected failure, like a disk
quota being exceeded, or similar.

--
John




reply via email to

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