bug-gnu-utils
[Top][All Lists]
Advanced

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

tar 1.13 --tape-length bug


From: Andy Peterson
Subject: tar 1.13 --tape-length bug
Date: Tue, 12 Jun 2001 16:26:44 -0400 (EDT)

Am I the only one trying to use --tape-length?

It appears that the sense on the options parser is reversed, causing tar
to bail whenever you try to specify a tape length that isn't LONG_MAX:

tar-1.13 running on GNU/Linux Intel:

asystole:~> tar cvfML /tmp/test.tar 10 *
tar: Invalid tape length
Try `tar --help' for more information.
asystole:~> 

Here's a diff to 1.13's tar.c that makes things all better:

*** tar.c.dist  Wed Jul  7 01:49:50 1999
--- tar.c       Tue Jun 12 15:58:23 2001
***************
*** 654,660 ****
        case 'L':
        {
          unsigned long u;
!         if (xstrtoul (optarg, (char **) 0, 10, &u, "") != LONG_MAX)
            USAGE_ERROR ((0, 0, _("Invalid tape length")));
          clear_tarlong (tape_length_option);
          add_to_tarlong (tape_length_option, u);
--- 654,660 ----
        case 'L':
        {
          unsigned long u;
!         if (xstrtoul (optarg, (char **) 0, 10, &u, "") == LONG_MAX)
            USAGE_ERROR ((0, 0, _("Invalid tape length")));
          clear_tarlong (tape_length_option);
          add_to_tarlong (tape_length_option, u);






reply via email to

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