summaryrefslogtreecommitdiff
path: root/support.cc
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2011-09-10 20:30:20 -0400
committersrs5694 <srs5694@users.sourceforge.net>2011-09-10 20:30:20 -0400
commita17fe69ec07c93a24894e4c4243f05af2bfc5bd7 (patch)
treee79312858bcf530d1d27d7112dd03e433c947b44 /support.cc
parent3860cbe1cafb88d70097bdfb8d84cc0029f1738e (diff)
downloadsgdisk-a17fe69ec07c93a24894e4c4243f05af2bfc5bd7.tar.gz
Changes for version 0.8.0
Diffstat (limited to 'support.cc')
-rw-r--r--support.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/support.cc b/support.cc
index 24bcffb..db5adb2 100644
--- a/support.cc
+++ b/support.cc
@@ -110,7 +110,7 @@ uint64_t GetSectorNum(uint64_t low, uint64_t high, uint64_t def, uint64_t sSize,
// to 2. If value includes a "+", adds low and subtracts 1; if SIValue
// inclues a "-", subtracts from high. If IeeeValue is empty, returns def.
// Returns final sector value. In case inValue is invalid, returns 0 (a
-// sector value that's always is use on GPT and therefore invalid); and if
+// sector value that's always in use on GPT and therefore invalid); and if
// inValue works out to something outside the range low-high, returns the
// computed value; the calling function is responsible for checking the
// validity of this value.
@@ -304,3 +304,19 @@ void ReverseBytes(void* theValue, int numBytes) {
exit(1);
} // if/else
} // ReverseBytes()
+
+// On Windows, display a warning and ask whether to continue. If the user elects
+// not to continue, exit immediately.
+void WinWarning(void) {
+ #ifdef _WIN32
+ cout << "\a************************************************************************\n"
+ << "Most versions of Windows cannot boot from a GPT disk, and most varieties\n"
+ << "prior to Vista cannot read GPT disks. Therefore, you should exit now\n"
+ << "unless you understand the implications of converting MBR to GPT or creating\n"
+ << "a new GPT disk layout!\n"
+ << "************************************************************************\n\n";
+ cout << "Are you SURE you want to continue? ";
+ if (GetYN() != 'Y')
+ exit(0);
+ #endif
+} // WinWarning()