From nobody Wed Feb 15 19:08:56 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH7052m9qz3rCbl for ; Wed, 15 Feb 2023 19:08:37 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH7046kj0z4D4H for ; Wed, 15 Feb 2023 19:08:36 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Authentication-Results: mx1.freebsd.org; none Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.16.1/8.15.2) with ESMTPS id 31FJ8us7034800 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 15 Feb 2023 11:08:57 -0800 (PST) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.16.1/8.15.2/Submit) id 31FJ8uGq034799; Wed, 15 Feb 2023 11:08:56 -0800 (PST) (envelope-from fbsd) Date: Wed, 15 Feb 2023 11:08:56 -0800 From: bob prohaska To: Mark Millard 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> References: <20230212195324.GB21535@www.zefox.net> <03840D0B-13D4-4F22-BDAF-2887A4D78BED@yahoo.com> <20230213232519.GD95670@funkthat.com> <20230214161415.GA28276@www.zefox.net> <20230214183827.GG95670@funkthat.com> <20230214210601.GA28959@www.zefox.net> <20230214232746.GI95670@funkthat.com> <20230215154424.GA34278@www.zefox.net> List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4PH7046kj0z4D4H X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N 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