summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2012-03-08 03:44:56 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2012-03-08 03:44:56 +0100
commit6f85ec4f1e41b802cd517cc57dacb5a604d73e8a (patch)
treecf76dc1deb0cafdc240f883619b0f1ef24e51ab5
parent1f4fe6e731d05e55238c1e9805101f43cb9edebf (diff)
downloadfwbench-6f85ec4f1e41b802cd517cc57dacb5a604d73e8a.tar.gz
fwbench-6f85ec4f1e41b802cd517cc57dacb5a604d73e8a.tar.bz2
fwbench-6f85ec4f1e41b802cd517cc57dacb5a604d73e8a.tar.xz
fwbench-6f85ec4f1e41b802cd517cc57dacb5a604d73e8a.zip
Fix handling of size argument
-rw-r--r--fwbench.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fwbench.c b/fwbench.c
index ce96d91..01a879b 100644
--- a/fwbench.c
+++ b/fwbench.c
@@ -111,7 +111,7 @@ void Usage(int argc, char* const argv[], const char *format, ...) {
" -n frames - Number of frames to write\n"
" -g <width>x<height> - Geometry [1024]\n"
" -g <pixels> - Number of megapixels [0.7]\n"
-" -m <percent> - Tolerable missing frames [100%%]\n"
+" -m <percent> - Tolerable missing frames [100%%]\n"
" -q - Quiete\n"
" -h - Help\n"
"\n\n",
@@ -173,7 +173,7 @@ static void set_time(setup_t *setup, size_t run_time) {
}
static void set_size(setup_t *setup, size_t size) {
- setup->iters = size / setup->frame_size + (size % setup->frame_size)?1:0;
+ setup->iters = size / setup->frame_size + ((size % setup->frame_size)?1:0);
}
static void set_frames_per_file(setup_t *setup, size_t fpf) {
@@ -521,7 +521,8 @@ int main(int argc, char* const argv[])
result = read(fd, buffer, setup.frame_size - setup.num_read);
}
- printf("Wrote %lu GB\n", setup.frame_size * setup.frames / 1024 / 1024 / 1024);
+ if (!quiet)
+ printf("Wrote %lu GB\n", setup.frame_size * setup.frames / 1024 / 1024 / 1024);
g_thread_join(thr);