Yes basicmbr.cc needs same fix for "fixparts"
and multiple parts in gpttext

I've updated the patch

--
Gianluigi Tiesi <sher...@netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/

Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
Description: Avoid infinite loop on stdin EOF

--- gdisk-0.8.1.orig/gpttext.cc
+++ gdisk-0.8.1/gpttext.cc
@@ -513,6 +513,7 @@ void GPTDataTextUI::MainMenu(string file
       cout << "\nCommand (? for help): ";
       switch (ReadString()[0]) {
          case '\0':
+            goOn = !cin.eof();
             break;
          case 'b': case 'B':
             cout << "Enter backup filename to save: ";
@@ -608,6 +609,7 @@ void GPTDataTextUI::RecoveryMenu(string
       cout << "\nRecovery/transformation command (? for help): ";
       switch (ReadString()[0]) {
          case '\0':
+            goOn = !cin.eof();
             break;
          case 'b': case 'B':
             RebuildMainHeader();
@@ -733,6 +735,7 @@ void GPTDataTextUI::ExpertsMenu(string f
       cout << "\nExpert command (? for help): ";
       switch (ReadString()[0]) {
          case '\0':
+            goOn = !cin.eof();
             break;
          case 'a': case 'A':
             if (GetPartRange(&temp1, &temp2) > 0)
--- gdisk-0.8.1.orig/basicmbr.cc
+++ gdisk-0.8.1/basicmbr.cc
@@ -1532,6 +1532,7 @@ int BasicMBRData::DoMenu(const string& p
       cout << prompt;
       switch (ReadString()[0]) {
          case '\0':
+            goOn = !cin.eof();
             break;
          case 'a': case 'A':
             num = GetNumber(1, MAX_MBR_PARTS, 1, "Toggle active flag for 
partition: ") - 1;

Reply via email to