Re: fsck segfaults on rpi3 running 13-stable (and on 14-CURRENT analyzing the same file system that resulted from the 13-STABLE crash)
- Reply: Mark Millard : "Re: fsck segfaults on rpi3 running 13-stable (and on 14-CURRENT analyzing the same file system that resulted from the 13-STABLE crash)"
- In reply to: Mark Millard : "Re: fsck segfaults on rpi3 running 13-stable (and on 14-CURRENT analyzing the same file system that resulted from the 13-STABLE crash)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 15 Feb 2023 19:08:56 UTC
On Wed, Feb 15, 2023 at 09:40:51AM -0800, Mark Millard wrote:
>
> Looking in my /usr/main-src/sbin/fsck_ffs/inode.c
> I see that the original file has a leading tab
> instead of spaces.
>
> The following mostly ignores the 1st column that
> should have a space, -, or + in the diff output for
> the file-content lines. It is mostly about the text
> after the first column.
>
> So, if you have spaces instead after the first column
> for the lines that start with a space, those lines
> will not match, leading to a rejection for the
> context matching done by patch.
Replacing spaces with tabs allowed patch to find the
location, but it still fails with
patch: **** malformed patch at line 5: printf("SIZE=%ju ", (uintmax_t)DIP(dp, di_size));
Editing by hand looks like a good way to drive myself crazy 8-)
I take it the goal is to find the lines
printf("SIZE=%ju ", (uintmax_t)DIP(dp, di_size));
t = DIP(dp, di_mtime);
p = ctime(&t);
delete the line
printf("MTIME=%12.12s %4.4s ", &p[4], &p[20]);
and add the four lines
if (p == NULL)
printf("MTIME=invalid ");
else
printf("MTIME=%12.12s %4.4s ", &p[4], &p[20]);
Do I at least correctly understand the intent of the patch?
Thanks for all your patience, it might be best to wait for
a fix to be committed to src.
bob prohaska