bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] [RFC-Patch] --ignore-zeros for compare? (GNU tar, star and


From: Jan-Benedict Glaw
Subject: Re: [Bug-tar] [RFC-Patch] --ignore-zeros for compare? (GNU tar, star and BSD tar speed comparision +script)
Date: Mon, 22 Oct 2007 23:06:08 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Mon, 2007-10-22 23:02:52 +0200, Jan-Benedict Glaw <address@hidden> wrote:
> 
> I just had a look at the sources and probably found an unrelated
> glitch:
> 
> compare.c:verify_volume()
> 
> 518 void
> 519 verify_volume (void)
> 520 {
> [...]
> 579   while (1)
> 580     {
> 581       enum read_header status = read_header (false);
> [...]
> 600       if (status == HEADER_ZERO_BLOCK || status == HEADER_END_OF_FILE)
> 601         break;
> 605     }
> 606 
> 607   access_mode = ACCESS_WRITE;
> 608   now_verifying = 0;
> 609 }
> 
> I didn't verify, but shouldn't this read like this?
> 
> --- src/compare.c~    2007-10-22 22:59:52.000000000 +0200
> +++ src/compare.c     2007-10-22 23:00:46.000000000 +0200
> @@ -597,7 +597,8 @@
>                           "VERIFY FAILURE: %d invalid headers detected",
>                           counter), counter));
>       }
> -      if (status == HEADER_ZERO_BLOCK || status == HEADER_END_OF_FILE)
> +      if (status == HEADER_ZERO_BLOCK && ignore_zeros_option
                                         ^^^^^^^

Typo, of course... Needs inversion here.

> +       || status == HEADER_END_OF_FILE)
>       break;
>  
>        diff_archive ();

MfG, JBG

-- 
      Jan-Benedict Glaw      address@hidden              +49-172-7608481
  Signature of:                          Zensur im Internet? Nein danke!
  the second  :

Attachment: signature.asc
Description: Digital signature


reply via email to

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