summaryrefslogtreecommitdiff
path: root/support.cc
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2011-03-18 12:35:56 -0400
committersrs5694 <srs5694@users.sourceforge.net>2011-03-18 12:35:56 -0400
commit815fb65195106b8afe1b8dfec5dae605dbd7ccbe (patch)
tree44fb495fb8ebe44b54453c3c34d20c14b321bf13 /support.cc
parent5a6085310b7f8fe1c35e56bcab7de161808b488d (diff)
downloadsgdisk-815fb65195106b8afe1b8dfec5dae605dbd7ccbe.tar.gz
A few minor changes.
Diffstat (limited to 'support.cc')
-rw-r--r--support.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/support.cc b/support.cc
index 4e7c874..00c0e12 100644
--- a/support.cc
+++ b/support.cc
@@ -15,7 +15,6 @@
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
-#include <unicode/ustdio.h>
#include <string>
#include <iostream>
#include <sstream>
@@ -110,7 +109,9 @@ uint64_t GetSectorNum(uint64_t low, uint64_t high, uint64_t def, uint64_t sSize,
// converts to sectors. For instance, with 512-byte sectors, "1K" converts
// 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 integral sector value.
+// Returns final sector value. In case inValue works out to something that
+// is not in the range of low to high (inclusive), returns high + 1; the
+// calling function is responsible for checking the validity of this value.
uint64_t IeeeToInt(string inValue, uint64_t sSize, uint64_t low, uint64_t high, uint64_t def) {
uint64_t response = def, bytesPerUnit = 1, mult = 1, divide = 1;
size_t foundAt = 0;