Fixed bug that caused spurious "1" exit condition in gdisk. Also
modified Windows warning text in light of common use of GPT on Windows
8 and 8.1.
diff --git a/gdisk.cc b/gdisk.cc
index a6ea2e9..5f85498 100644
--- a/gdisk.cc
+++ b/gdisk.cc
@@ -15,6 +15,7 @@
GPTDataTextUI theGPT;
string device = "";
UnicodeString uString;
+ int isError = 0;
#ifndef EFI
cout << "GPT fdisk (gdisk) version " << GPTFDISK_VERSION << "\n\n";
@@ -49,16 +50,20 @@
device = (string) argv[1];
} else { // 3 arguments, but none is "-l"
cerr << "Usage: " << argv[0] << " [-l] device_file\n";
+ isError = 1;
} // if/elseif/else
if (device != "") {
theGPT.JustLooking();
if (theGPT.LoadPartitions(device))
theGPT.DisplayGPTData();
+ else
+ isError = 1;
} // if
break;
default:
cerr << "Usage: " << argv[0] << " [-l] device_file\n";
+ isError = 1;
break;
} // switch
- return 1 ;
+ return (isError);
} // main