Module Name: src Committed By: sborrill Date: Fri Nov 27 08:59:43 UTC 2009
Modified Files: src/sbin/newfs_msdos [netbsd-5]: newfs_msdos.c Log Message: Pull up the following revisions(s) (requested by tsutsui in ticket #1163): sbin/newfs_msdos/newfs_msdos.c: revision 1.30 Make fs size detection get proper size rather than disk size. Without this, newfs_msdos(8) assumes the target fs size is whole disk size, so newfs_msdos(8) will fail or create wrong fs. To generate a diff of this commit: cvs rdiff -u -r1.27.2.2 -r1.27.2.3 src/sbin/newfs_msdos/newfs_msdos.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/newfs_msdos/newfs_msdos.c diff -u src/sbin/newfs_msdos/newfs_msdos.c:1.27.2.2 src/sbin/newfs_msdos/newfs_msdos.c:1.27.2.3 --- src/sbin/newfs_msdos/newfs_msdos.c:1.27.2.2 Mon Feb 2 20:52:42 2009 +++ src/sbin/newfs_msdos/newfs_msdos.c Fri Nov 27 08:59:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: newfs_msdos.c,v 1.27.2.2 2009/02/02 20:52:42 snj Exp $ */ +/* $NetBSD: newfs_msdos.c,v 1.27.2.3 2009/11/27 08:59:43 sborrill Exp $ */ /* * Copyright (c) 1998 Robert Nordier @@ -33,7 +33,7 @@ static const char rcsid[] = "$FreeBSD: src/sbin/newfs_msdos/newfs_msdos.c,v 1.15 2000/10/10 01:49:37 wollman Exp $"; #else -__RCSID("$NetBSD: newfs_msdos.c,v 1.27.2.2 2009/02/02 20:52:42 snj Exp $"); +__RCSID("$NetBSD: newfs_msdos.c,v 1.27.2.3 2009/11/27 08:59:43 sborrill Exp $"); #endif #endif /* not lint */ @@ -800,7 +800,7 @@ if (!bpb->hds) bpb->hds = ckgeom(fname, geo.dg_ntracks, "drive heads"); if (!bpb->bsec) - bpb->bsec = geo.dg_secperunit; + bpb->bsec = dkw.dkw_size; } }