summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools
diff options
context:
space:
mode:
author MetalliC <0vetal0@gmail.com>2016-05-25 17:57:31 +0300
committer MetalliC <0vetal0@gmail.com>2016-05-25 17:57:31 +0300
commit16d0839f766b9716b7512882dc70e5582f9cadef (patch)
tree616bfaab83146bdc8ba5237a1f22f14db263179b /src/tools
parent77cb4e9d72bae33e2d1fb8713c5555d6dfc787cd (diff)
chdman: ignore ATA ident CHS values for > 8GB images
minor docs update
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/chdman.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp
index 4af9f6f378f..addfe14a913 100644
--- a/src/tools/chdman.cpp
+++ b/src/tools/chdman.cpp
@@ -1790,6 +1790,10 @@ static void do_create_hd(parameters_t &params)
cylinders = (identdata[3] << 8) | identdata[2];
heads = (identdata[7] << 8) | identdata[6];
sectors = (identdata[13] << 8) | identdata[12];
+
+ // ignore CHS for > 8GB drives
+ if (input_file && filesize > 0x200000000)
+ cylinders = 0;
}
// extract geometry from the parent if we have one