Date: Wed, 15 Feb 2023 11:08:56 -0800 From: bob prohaska <fbsd@www.zefox.net> To: Mark Millard <marklmi@yahoo.com> Cc: freebsd-arm@freebsd.org Subject: Re: fsck segfaults on rpi3 running 13-stable (and on 14-CURRENT analyzing the same file system that resulted from the 13-STABLE crash) Message-ID: <20230215190856.GA34665@www.zefox.net> In-Reply-To: <F3D2A8BA-E296-4609-9482-477DC1017236@yahoo.com> References: <20230212195324.GB21535@www.zefox.net> <03840D0B-13D4-4F22-BDAF-2887A4D78BED@yahoo.com> <20230213232519.GD95670@funkthat.com> <C282CC2D-4CDB-4A33-AFA8-C563E377CE8E@yahoo.com> <20230214161415.GA28276@www.zefox.net> <20230214183827.GG95670@funkthat.com> <20230214210601.GA28959@www.zefox.net> <20230214232746.GI95670@funkthat.com> <20230215154424.GA34278@www.zefox.net> <F3D2A8BA-E296-4609-9482-477DC1017236@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230215190856.GA34665>