From 8bcee3b317e8a45bcebb3840b2802af1f3d02187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 18 Jul 2002 13:31:55 +0000 Subject: [PATCH] Added another subtle change from geist. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@302 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/makeflop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kernel/boot/makeflop.c b/src/kernel/boot/makeflop.c index 01ccc9dfbc..b216c999b9 100644 --- a/src/kernel/boot/makeflop.c +++ b/src/kernel/boot/makeflop.c @@ -91,7 +91,9 @@ main(int argc, char *argv[]) // patch the size of the output into bytes 3 & 4 of the bootblock blocks = st.st_size / 512; - blocks++; + if ((st.st_size % 512) != 0) + blocks++; + printf("size %d, blocks %d (size %d)\n", (unsigned long)st.st_size, blocks, blocks * 512); bootsector[2] = (blocks & 0x00ff); bootsector[3] = (blocks & 0xff00) >> 8;