Authentication-Results: name.execsw.org; dkim=pass (1024-bit key) header.d=netbsd.org header.i=@netbsd.org header.b=TjrrFz2R; dkim=fail reason="signature verification failed" (1024-bit key) header.d=netbsd.org header.i=@netbsd.org header.b=BhbbxYMx Received: by mail.netbsd.org (Postfix, from userid 605) id 6CD9984CE8; Tue, 23 Apr 2024 22:12:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org; s=20240131; t=1713910339; bh=LAUGawebFfbv+sp5SrfrSrRRpFc2ab580qzmG0yn7QA=; h=Date:From:Subject:To:List-Id:Reply-To:List-Unsubscribe; b=TjrrFz2RyF5SpHDsxdL+Lxjn8g2uE2ZBIQbe2beRerhPQ0NlUUhmI0QR0pGFxnDn6 CroghpXryUTZ4S0KO06REaZTqcLzf4RX0noUN5OCLyDh65J6Gsh6Kk1J2iNn8+IyKb 7psKhr7kkwsRsH32NKy20P0LL1lj8LNfSJfGmLdw= Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 3206A84E8D for ; Tue, 23 Apr 2024 22:12:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id sFS8qW8krBNe for ; Tue, 23 Apr 2024 22:12:17 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id BD10684D4B for ; Tue, 23 Apr 2024 22:12:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org; s=20240131; t=1713910337; bh=LAUGawebFfbv+sp5SrfrSrRRpFc2ab580qzmG0yn7QA=; h=Date:From:Subject:To:Reply-To; b=BhbbxYMx12DTkUGZxaRus5CCCBCFKwoTVYgobiENGD0SVpUCgTES52szzfLizXf1P CXjIVZ6WpkclfkOwrr0/kjOMmZ3N7aJymGG7WyAB6RjjHgSFgcICPOKgpnYtE4c33y UjPJIpWukx2XMV11tDgHll/bSP6JnTN5aKldIVYo= Received: by cvs.NetBSD.org (Postfix, from userid 500) id E2F1FFA2C; Tue, 23 Apr 2024 22:12:16 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Tue, 23 Apr 2024 18:12:16 -0400 From: "Christos Zoulas" Subject: CVS commit: src/usr.sbin/makefs To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20240423221216.E2F1FFA2C@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Christos Zoulas" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: christos Date: Tue Apr 23 22:12:16 UTC 2024 Modified Files: src/usr.sbin/makefs: walk.c Log Message: makefs: Sort directory contents by name (Jan-Benedict Glaw) `makefs` inserts nodes into its internal data structures in the order as returned by `readdir()` calls. As this is unpredictable, sort entries by name before creating the target filesystem. This is done by first converting the (per-directory) linked list into a plain array, sort it, finally re-link the list. Special case for the sorting function: The "." directory entry seems to be ment to be always at the front, so always check that first. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/makefs/walk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.