NetBSD Problem Report #47911
From dholland@netbsd.org Sun Jun 9 22:26:24 2013
Return-Path: <dholland@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 8F578703EE
for <gnats-bugs@gnats.NetBSD.org>; Sun, 9 Jun 2013 22:26:24 +0000 (UTC)
Message-Id: <20130609222624.21A2614A174@mail.netbsd.org>
Date: Sun, 9 Jun 2013 22:26:24 +0000 (UTC)
From: dholland@NetBSD.org
Reply-To: dholland@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: suspect APPLEUFS-related code in newfs
X-Send-Pr-Version: 3.95
>Number: 47911
>Category: bin
>Synopsis: suspect APPLEUFS-related code in newfs
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 09 22:30:00 +0000 2013
>Last-Modified: Sun Jun 23 04:15:01 +0000 2013
>Originator: David A. Holland
>Release: current of 20130608
>Organization:
>Environment:
n/a
>Description:
The DIRBLKSIZ logic in makedir() in newfs/mkfs.c seems wrong; see
below.
>How-To-Repeat:
code reading
>Fix:
Someone who knows more about APPLEUFS than the name please eyeball
this in case I'm missing something:
Index: sbin/newfs/mkfs.c
===================================================================
RCS file: /cvsroot/src/sbin/newfs/mkfs.c,v
retrieving revision 1.115
diff -U 5 -p -r1.115 mkfs.c
--- sbin/newfs/mkfs.c 9 Jun 2013 18:29:41 -0000 1.115
+++ sbin/newfs/mkfs.c 9 Jun 2013 22:23:11 -0000
@@ -1255,11 +1255,11 @@ makedir(struct direct *protodir, int ent
int i, spcleft;
int dirblksiz = UFS_DIRBLKSIZ;
if (isappleufs)
dirblksiz = APPLEUFS_DIRBLKSIZ;
- memset(buf, 0, UFS_DIRBLKSIZ);
+ memset(buf, 0, dirblksiz);
spcleft = dirblksiz;
for (cp = buf, i = 0; i < entries - 1; i++) {
protodir[i].d_reclen = UFS_DIRSIZ(Oflag == 0, &protodir[i], 0);
copy_dir(&protodir[i], (struct direct*)cp);
cp += protodir[i].d_reclen;
>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47911 CVS commit: src/sbin/newfs
Date: Sun, 23 Jun 2013 04:14:28 +0000
Module Name: src
Committed By: dholland
Date: Sun Jun 23 04:14:28 UTC 2013
Modified Files:
src/sbin/newfs: mkfs.c
Log Message:
Revert accidental commit of the change for PR 47911; got rolled into
other stuff by mistake.
To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sbin/newfs/mkfs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.