Makefile: Fix android compilation
[fio.git] / oslib / linux-blkzoned.c
index 6f89ec6f414e63c6a9bf6691a10dfc6723a29451..185bd5011bbc5105e7bf67a171b0d93a93727ae2 100644 (file)
@@ -140,10 +140,8 @@ int blkzoned_get_zoned_model(struct thread_data *td, struct fio_file *f,
 {
        char *model_str = NULL;
 
-       if (f->filetype != FIO_TYPE_BLOCK) {
-               *model = ZBD_IGNORE;
-               return 0;
-       }
+       if (f->filetype != FIO_TYPE_BLOCK)
+               return -EINVAL;
 
        *model = ZBD_NONE;
 
@@ -171,8 +169,10 @@ int blkzoned_get_max_open_zones(struct thread_data *td, struct fio_file *f,
                return -EIO;
 
        max_open_str = blkzoned_get_sysfs_attr(f->file_name, "queue/max_open_zones");
-       if (!max_open_str)
+       if (!max_open_str) {
+               *max_open_zones = 0;
                return 0;
+       }
 
        dprint(FD_ZBD, "%s: max open zones supported by device: %s\n",
               f->file_name, max_open_str);