aboutsummaryrefslogtreecommitdiff
path: root/fsdev/qemu-fsdev-throttle.c
diff options
context:
space:
mode:
Diffstat (limited to 'fsdev/qemu-fsdev-throttle.c')
-rw-r--r--fsdev/qemu-fsdev-throttle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fsdev/qemu-fsdev-throttle.c b/fsdev/qemu-fsdev-throttle.c
index fe1d76dc76..5c83a1cc09 100644
--- a/fsdev/qemu-fsdev-throttle.c
+++ b/fsdev/qemu-fsdev-throttle.c
@@ -31,7 +31,7 @@ static void fsdev_throttle_write_timer_cb(void *opaque)
qemu_co_enter_next(&fst->throttled_reqs[true], NULL);
}
-void fsdev_throttle_parse_opts(QemuOpts *opts, FsThrottle *fst, Error **errp)
+int fsdev_throttle_parse_opts(QemuOpts *opts, FsThrottle *fst, Error **errp)
{
throttle_config_init(&fst->cfg);
fst->cfg.buckets[THROTTLE_BPS_TOTAL].avg =
@@ -75,7 +75,7 @@ void fsdev_throttle_parse_opts(QemuOpts *opts, FsThrottle *fst, Error **errp)
fst->cfg.op_size =
qemu_opt_get_number(opts, "throttling.iops-size", 0);
- throttle_is_valid(&fst->cfg, errp);
+ return throttle_is_valid(&fst->cfg, errp) ? 0 : -1;
}
void fsdev_throttle_init(FsThrottle *fst)