X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=btt%2Fargs.c;fp=btt%2Fargs.c;h=e6df5e7606c35ae2fc9ff8b963b1a7657b43945e;hb=d76c5b81b99faca0959afcdd2e73330c61f69bfc;hp=b0351e8b805a79adb472b4b03ffacfb424eb6e13;hpb=0ac4c20e46fc644b1ac9e3021e3ebaa88b9c536f;p=blktrace.git diff --git a/btt/args.c b/btt/args.c index b0351e8..e6df5e7 100644 --- a/btt/args.c +++ b/btt/args.c @@ -235,11 +235,7 @@ void handle_args(int argc, char *argv[]) exit(1); } - ifd = open(input_name, O_RDONLY); - if (ifd < 0) { - perror(input_name); - exit(1); - } + setup_ifile(input_name); if (output_name == NULL) ranges_ofp = avgs_ofp = stdout; @@ -273,6 +269,7 @@ void handle_args(int argc, char *argv[]) perror(iostat_name); exit(1); } + setbuffer(iostat_ofp, malloc(64 * 1024), 64 * 1024); } if (per_io_name != NULL) { @@ -281,5 +278,6 @@ void handle_args(int argc, char *argv[]) perror(per_io_name); exit(1); } + setbuffer(per_io_ofp, malloc(64 * 1024), 64 * 1024); } }