diff options
author | srs5694 <srs5694@users.sourceforge.net> | 2011-03-18 12:35:56 -0400 |
---|---|---|
committer | srs5694 <srs5694@users.sourceforge.net> | 2011-03-18 12:35:56 -0400 |
commit | 815fb65195106b8afe1b8dfec5dae605dbd7ccbe (patch) | |
tree | 44fb495fb8ebe44b54453c3c34d20c14b321bf13 /support.cc | |
parent | 5a6085310b7f8fe1c35e56bcab7de161808b488d (diff) | |
download | sgdisk-815fb65195106b8afe1b8dfec5dae605dbd7ccbe.tar.gz |
A few minor changes.
Diffstat (limited to 'support.cc')
-rw-r--r-- | support.cc | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |