projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d79ff8c
)
t/io_uring: ensure that nthreads is > 0
author
Jens Axboe
<axboe@kernel.dk>
Wed, 8 Sep 2021 20:12:16 +0000
(14:12 -0600)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 8 Sep 2021 20:12:16 +0000
(14:12 -0600)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/io_uring.c
patch
|
blob
|
blame
|
history
diff --git
a/t/io_uring.c
b/t/io_uring.c
index 23c9d60677a0c44782cd77a4a581669beed3dd2e..c9ca3e9d23d6f2638b08b146e707a1527de152b5 100644
(file)
--- a/
t/io_uring.c
+++ b/
t/io_uring.c
@@
-598,6
+598,10
@@
int main(int argc, char *argv[])
break;
case 'n':
nthreads = atoi(optarg);
+ if (!nthreads) {
+ printf("Threads must be non-zero\n");
+ usage(argv[0], 1);
+ }
break;
case 'h':
case '?':
@@
-623,7
+627,7
@@
int main(int argc, char *argv[])
i = optind;
nfiles = argc - i;
if (!nfiles) {
- printf("
n
o files specified\n");
+ printf("
N
o files specified\n");
usage(argv[0], 1);
}
threads_per_f = nthreads / nfiles;