[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1457513845.13390.17.camel@frank>
Date: Wed, 09 Mar 2016 03:57:25 -0500
From: David Turner <novalis@...alis.org>
To: Theodore Ts'o <tytso@....edu>
Cc: Andreas Dilger <adilger@...ger.ca>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] e2fsck: Correct ext4 dates generated by old kernels
On Mon, 2016-03-07 at 10:27 -0500, Theodore Ts'o wrote:
> On Mon, Mar 07, 2016 at 04:34:04AM -0700, Andreas Dilger wrote:
> > On maint or master? I'd applied and tested it on maint before sending it.
>
> At least on my tree David Turner's 64-bit date changes only landed on
> the master/next branch. It was never on the maint branch....
>
> - Ted
Sorry for the delay in responding; I hadn't had time to look at this
until today. I've figured out the problem.
In commit 188960ea4, the following change was made:
@@ -224,15 +232,19 @@ time_t string_to_time(const char *arg)
/* interpret it as an integer */
arg++;
fallback:
- ret = strtoul(arg, &tmp, 0);
+ ret = strtoll(arg+1, &tmp, 0);
if (*tmp)
This is wrong at least for the non-goto case, because arg was just
incremented just above. So it removes the first character *after* the @
as well. I think it's wrong in the general case too; there's no reason
to skip the first character.
I've attached new version of the patch which corrects this error (it's
against master -- let me know if that's not right).
Thanks.
View attachment "0001-e2fsck-Correct-ext4-dates-generated-by-old-kernels.patch" of type "text/x-patch" (10126 bytes)
Powered by blists - more mailing lists