summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/fdformat/fdformat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/fdformat/fdformat.c b/usr.sbin/fdformat/fdformat.c
index 748b21d4a39..26ca05ebee2 100644
--- a/usr.sbin/fdformat/fdformat.c
+++ b/usr.sbin/fdformat/fdformat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdformat.c,v 1.14 2006/04/02 00:50:42 deraadt Exp $ */
+/* $OpenBSD: fdformat.c,v 1.15 2006/08/07 18:20:57 miod Exp $ */
/*
* Copyright (C) 1992-1994 by Joerg Wunsch, Dresden
@@ -281,6 +281,8 @@ main(int argc, char *argv[])
bytes_per_track = fdt.sectrac * (1<<fdt.secsize) * 128;
tracks_per_dot = fdt.tracks * fdt.heads / 40;
+ if (tracks_per_dot == 0)
+ tracks_per_dot++;
if (verify_only) {
if (!quiet)