aboutsummaryrefslogtreecommitdiffstats
path: root/stats.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2010-07-03 22:43:21 -0400
committerJeff Garzik <jgarzik@redhat.com>2010-07-03 22:43:21 -0400
commitd1b4c50492be7346f9b4eea44a3e18b15cbca0c5 (patch)
tree2cbacc5fe0f6816eab534a2ef5426693d425904e /stats.c
parentdc51bdc91b67e16b1b2cdfd86cc47d98612bf93a (diff)
downloadrng-tools-d1b4c50492be7346f9b4eea44a3e18b15cbca0c5.tar.gz
rng-tools-d1b4c50492be7346f9b4eea44a3e18b15cbca0c5.tar.xz
rng-tools-d1b4c50492be7346f9b4eea44a3e18b15cbca0c5.zip
Add TPM RNG support.
also, trim trailing whitespace. Contributed by Dell, with bug fixes by David Howells @ Red Hat. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'stats.c')
-rw-r--r--stats.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/stats.c b/stats.c
index 86c908d..eede033 100644
--- a/stats.c
+++ b/stats.c
@@ -7,7 +7,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -45,8 +45,8 @@ void set_stat_prefix(const char* prefix)
strncpy(stat_prefix, prefix, sizeof(stat_prefix)-1);
}
-static void scale_mult_unit(char *unit, int unitsize,
- const char *baseunit,
+static void scale_mult_unit(char *unit, int unitsize,
+ const char *baseunit,
double *value_min,
double *value_avg,
double *value_max)
@@ -54,7 +54,7 @@ static void scale_mult_unit(char *unit, int unitsize,
int mult = 0;
char multchar[] = "KMGTPE";
- while ((*value_min >= 1024.0) && (*value_avg >= 1024.0) &&
+ while ((*value_min >= 1024.0) && (*value_avg >= 1024.0) &&
(*value_max >= 1024.0) && (mult < sizeof(multchar))) {
mult++;
*value_min = *value_min / 1024.0;
@@ -128,8 +128,8 @@ char *dump_stat_stat(char *buf, int size,
}
char *dump_stat_bw(char *buf, int size,
- const char *msg, const char *unit,
- struct rng_stat *stat,
+ const char *msg, const char *unit,
+ struct rng_stat *stat,
uint64_t blocksize)
{
char unitscaled[20];