X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=iolog.c;h=65933672fa3e3da4ef8a5b59b6f70636f076a955;hp=9bcf0d8e2982e37ce5d48fbd64e9653872e54ea0;hb=04778baf2def8c1c5a3d7d60233c56d140831711;hpb=29df29eaf88958c8741103d2056a4773d4959d9d diff --git a/iolog.c b/iolog.c index 9bcf0d8e..65933672 100644 --- a/iolog.c +++ b/iolog.c @@ -480,17 +480,22 @@ int init_iolog(struct thread_data *td) int ret = 0; if (td->o.read_iolog_file) { + int need_swap; + /* * Check if it's a blktrace file and load that if possible. * Otherwise assume it's a normal log file and load that. */ - if (is_blktrace(td->o.read_iolog_file)) - ret = load_blktrace(td, td->o.read_iolog_file); + if (is_blktrace(td->o.read_iolog_file, &need_swap)) + ret = load_blktrace(td, td->o.read_iolog_file, need_swap); else ret = init_iolog_read(td); } else if (td->o.write_iolog_file) ret = init_iolog_write(td); + if (ret) + td_verror(td, EINVAL, "failed initializing iolog"); + return ret; }