summaryrefslogtreecommitdiff
path: root/parttypes.cc
diff options
context:
space:
mode:
authorGilles Moris <gilles.moris@free.fr>2019-05-15 07:17:40 +0200
committerGilles Moris <gilles.moris@free.fr>2019-05-15 07:17:40 +0200
commit522273e3db5823aedf6af8786cb01a316367ed32 (patch)
treeeef6b7a2bd1c122b7468797d55f24116ddaa3376 /parttypes.cc
parent94b1490b7b906b90e743512edd305302ed96ce0f (diff)
downloadsgdisk-522273e3db5823aedf6af8786cb01a316367ed32.tar.gz
Allow to quit early the display of partition types using 'q'
Diffstat (limited to 'parttypes.cc')
-rw-r--r--parttypes.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/parttypes.cc b/parttypes.cc
index 1b32569..38b9193 100644
--- a/parttypes.cc
+++ b/parttypes.cc
@@ -525,8 +525,10 @@ void PartType::ShowAllTypes(int maxLines) const {
if (thisType->next) {
cout << "\n";
if ((maxLines > 0) && (lineCount++ % maxLines) == 0) {
- cout << "Press the <Enter> key to see more codes: ";
+ cout << "Press the <Enter> key to see more codes, q to quit: ";
getline(cin, line);
+ if ((line[0] =='q') || (line[0] =='Q'))
+ break;
} // if reached screen line limit
} // if there's another entry following this one
} else {