diff --git a/ocaml/xapi/xapi_vbd_helpers.ml b/ocaml/xapi/xapi_vbd_helpers.ml index 1285c740c27..94471108e41 100644 --- a/ocaml/xapi/xapi_vbd_helpers.ml +++ b/ocaml/xapi/xapi_vbd_helpers.ml @@ -377,7 +377,7 @@ let clear_current_operations ~__context ~self = (** Check if the device string has the right form *) let valid_device dev ~_type = dev = "autodetect" - || Option.is_none (Device_number.of_string dev ~hvm:false) + || Option.is_some (Device_number.of_string dev ~hvm:false) || match _type with | `Floppy ->