- if (!ret) {
- if (!strcmp(file, "-") && td->o.read_iolog_file != NULL) {
- char *fname = get_name_by_idx(td->o.read_iolog_file,
- td->subjob_number);
- if (!strcmp(fname, "-")) {
- log_err("fio: we can't read both iolog "
- "and job file from stdin.\n");
+ if (!ret && td->o.read_iolog_file != NULL) {
+ char *fname = get_name_by_idx(td->o.read_iolog_file,
+ td->subjob_number);
+ if (!strcmp(fname, "-")) {
+ if (stdin_occupied) {
+ log_err("fio: only one user (read_iolog_file/job "
+ "file) of stdin is permitted at once but "
+ "more than one was found.\n");