diff options
author | Rod Smith <rodsmith@rodsbooks.com> | 2017-07-21 21:48:13 -0400 |
---|---|---|
committer | Rod Smith <rodsmith@rodsbooks.com> | 2017-07-21 21:48:13 -0400 |
commit | 503e9ada12d38394381442a944d5c9da847800b6 (patch) | |
tree | 9ee8654a5dd22cea6fb0cf0d0b161c4bb764400e /support.cc | |
parent | e7452642ac5fa514bd359bc3f93b6b46b1714213 (diff) | |
download | sgdisk-503e9ada12d38394381442a944d5c9da847800b6.tar.gz |
Initial commit of support for moving main partition table to arbitrary
location on disk (within limits based on existing partitions).
Diffstat (limited to 'support.cc')
-rw-r--r-- | support.cc | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -67,8 +67,8 @@ string ReadString(void) { // If user provides no input, def (default value) is returned. // (If def is outside of the low-high range, an explicit response // is required.) -int GetNumber(int low, int high, int def, const string & prompt) { - int response, num; +uint64_t GetNumber(uint64_t low, uint64_t high, uint64_t def, const string & prompt) { + uint64_t response, num; char line[255]; if (low != high) { // bother only if low and high differ... @@ -77,7 +77,7 @@ int GetNumber(int low, int high, int def, const string & prompt) { cin.getline(line, 255); if (!cin.good()) exit(5); - num = sscanf(line, "%d", &response); + num = sscanf(line, "%ld", &response); if (num == 1) { // user provided a response if ((response < low) || (response > high)) cout << "Value out of range\n"; |