Module Name:    src
Committed By:   jakllsch
Date:           Sat Dec 15 04:34:36 UTC 2012

Modified Files:
        src/sbin/newfs_msdos: newfs_msdos.c

Log Message:
There are two problems with insisting the FAT file system size be a multiple
of track-size units:  2) the FAT metadata areas may not be a multiple of a
"track", 1) the partition may not be track-aligned to begin with, 0) what's
a "track"? is it something a robot rover leaves on Mars?


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 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.39 src/sbin/newfs_msdos/newfs_msdos.c:1.40
--- src/sbin/newfs_msdos/newfs_msdos.c:1.39	Sun Nov  4 14:27:15 2012
+++ src/sbin/newfs_msdos/newfs_msdos.c	Sat Dec 15 04:34:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: newfs_msdos.c,v 1.39 2012/11/04 14:27:15 jakllsch Exp $	*/
+/*	$NetBSD: newfs_msdos.c,v 1.40 2012/12/15 04:34:36 jakllsch 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.39 2012/11/04 14:27:15 jakllsch Exp $");
+__RCSID("$NetBSD: newfs_msdos.c,v 1.40 2012/12/15 04:34:36 jakllsch Exp $");
 #endif
 #endif /* not lint */
 
@@ -409,15 +409,8 @@ main(int argc, char *argv[])
     if (oflag)
 	bpb.hid = opt_o;
     if (!(opt_f || (opt_h && opt_u && opt_S && opt_s && oflag))) {
-	off_t delta;
 	getbpbinfo(fd, fname, dtype, oflag, &bpb, opt_create != 0);
 	bpb.bsec -= (opt_ofs / bpb.bps);
-	delta = bpb.bsec % bpb.spt;
-	if (delta != 0) {
-	    warnx("trim %d sectors to adjust to a multiple of %d",
-		(int)delta, bpb.spt);
-	    bpb.bsec -= delta;
-	}
 	if (bpb.spc == 0) {     /* set defaults */
 	    if (bpb.bsec <= 6000)       /* about 3MB -> 512 bytes */
 		bpb.spc = 1;

Reply via email to