NetBSD Problem Report #223
From gnats Sun Apr 10 13:25:01 1994
Received: from forte (forte.mathematik.uni-Bremen.de [134.102.232.1]) by sun-lamp.cs.berkeley.edu (8.6.8/8.6.6) with ESMTP id NAA00242 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 10 Apr 1994 13:24:38 -0700
Message-Id: <199404101151.NAA22261@forte>
Date: Sun, 10 Apr 1994 13:51:53 +0200
From: thomas@mathematik.uni-Bremen.de
Reply-To: thomas@mathematik.uni-Bremen.de
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: another off_t victim (tunefs)
X-Send-Pr-Version: 3.2
>Number: 223
>Category: bin
>Synopsis: another off_t victim (tunefs)
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Apr 10 13:35:01 +0000 1994
>Closed-Date: Tue Apr 12 05:07:33 +0000 1994
>Last-Modified:
>Originator: Thomas Eberhardt
>Release:
>Organization:
CeVis, University of Bremen, Germany
>Environment:
System: NetBSD ed209 0.9a ED209#0 i386
Machine: i386
>Description:
tunefs is currently broken since it passes a off_t to a function
that expects a daddr_t.
>How-To-Repeat:
tunefs -m 0 <any-fs>
>Fix:
*** tunefs/tunefs.c- Fri Dec 17 07:37:12 1993
--- tunefs/tunefs.c Sun Apr 10 13:46:19 1994
***************
*** 203,209 ****
}
if (argc != 1)
goto usage;
! bwrite(SBOFF / dev_bsize, (char *)&sblock, SBSIZE);
if (Aflag)
for (i = 0; i < sblock.fs_ncg; i++)
bwrite(fsbtodb(&sblock, cgsblock(&sblock, i)),
--- 203,209 ----
}
if (argc != 1)
goto usage;
! bwrite((daddr_t)(SBOFF / dev_bsize), (char *)&sblock, SBSIZE);
if (Aflag)
for (i = 0; i < sblock.fs_ncg; i++)
bwrite(fsbtodb(&sblock, cgsblock(&sblock, i)),
***************
*** 232,238 ****
perror(file);
exit(3);
}
! if (bread(SBOFF, (char *)fs, SBSIZE)) {
fprintf(stderr, "bad super block");
perror(file);
exit(4);
--- 232,238 ----
perror(file);
exit(3);
}
! if (bread((daddr_t)SBOFF, (char *)fs, SBSIZE)) {
fprintf(stderr, "bad super block");
perror(file);
exit(4);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: cgd
State-Changed-When: Mon Apr 11 22:07:33 PDT 1994
State-Changed-Why:
fixed (and so much more!)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.