X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Ffalloc.c;h=2b00d525d648e071bb17a7e97c0b63405f192ec7;hb=836365452f6525a7d670205b823f7982de48f844;hp=525a0aae922d0e2d024122ba5e23ebcb24cbaf83;hpb=ef5f5a3a63f8b7c472f30484c520265aba6ef162;p=fio.git diff --git a/engines/falloc.c b/engines/falloc.c index 525a0aae..2b00d525 100644 --- a/engines/falloc.c +++ b/engines/falloc.c @@ -4,7 +4,7 @@ * IO engine that does regular fallocate to simulate data transfer * as fio ioengine. * DDIR_READ does fallocate(,mode = FALLOC_FL_KEEP_SIZE,) - * DDIR_WRITE does fallocate(,mode = 0) : fallocate with size extention + * DDIR_WRITE does fallocate(,mode = 0) : fallocate with size extension * DDIR_TRIM does fallocate(,mode = FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE) * */ @@ -23,7 +23,7 @@ * generic_open_file is not appropriate because does not allow to perform * TRIM in to file */ -int open_file(struct thread_data *td, struct fio_file *f) +static int open_file(struct thread_data *td, struct fio_file *f) { int from_hash = 0; @@ -43,9 +43,10 @@ open_again: if (f->fd == -1) { char buf[FIO_VERROR_SIZE]; - int __e = errno; - snprintf(buf, sizeof(buf) - 1, "open(%s)", f->file_name); - td_verror(td, __e, buf); + int e = errno; + + snprintf(buf, sizeof(buf), "open(%s)", f->file_name); + td_verror(td, e, buf); } if (!from_hash && f->fd != -1) {