Skip to content

Commit

Permalink
Remove guestcaps_block_type Virtio_SCSI
Browse files Browse the repository at this point in the history
Since we no longer support requesting virtio-scsi, this constructor
was never used.

Acked-by: Laszlo Ersek <lersek@redhat.com>
  • Loading branch information
rwmjones committed Nov 8, 2021
1 parent b28cd1d commit f0afc43
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 21 deletions.
2 changes: 1 addition & 1 deletion convert/convert.ml
Expand Up @@ -392,7 +392,7 @@ and do_convert g source inspect keep_serial_console interfaces =
(* Did we manage to install virtio drivers? *)
if not (quiet ()) then (
match guestcaps.gcaps_block_bus with
| Virtio_blk | Virtio_SCSI ->
| Virtio_blk ->
info (f_"This guest has virtio drivers installed.")
| IDE ->
info (f_"This guest does not have virtio drivers installed.")
Expand Down
9 changes: 2 additions & 7 deletions convert/convert_linux.ml
Expand Up @@ -915,12 +915,8 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ =
(* Update 'alias scsi_hostadapter ...' *)
let paths = augeas_modprobe ". =~ regexp('scsi_hostadapter.*')" in
(match block_type with
| Virtio_blk | Virtio_SCSI ->
let block_module =
match block_type with
| Virtio_blk -> "virtio_blk"
| Virtio_SCSI -> "virtio_scsi"
| IDE -> assert false in
| Virtio_blk ->
let block_module = "virtio_blk" in

if paths <> [] then (
(* There's only 1 scsi controller in the converted guest.
Expand Down Expand Up @@ -993,7 +989,6 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ =
let block_prefix_after_conversion =
match block_type with
| Virtio_blk -> "vd"
| Virtio_SCSI -> "sd"
| IDE -> ide_block_prefix in

let map =
Expand Down
1 change: 0 additions & 1 deletion convert/target_bus_assignment.ml
Expand Up @@ -35,7 +35,6 @@ let rec target_bus_assignment source_disks source_removables guestcaps =
let bus =
match guestcaps.gcaps_block_bus with
| Virtio_blk -> virtio_blk_bus
| Virtio_SCSI -> scsi_bus
| IDE -> ide_bus in
List.iteri (
fun i d ->
Expand Down
1 change: 0 additions & 1 deletion lib/create_ovf.ml
Expand Up @@ -891,7 +891,6 @@ and add_disks sizes guestcaps output_alloc output_format
"ovf:disk-interface",
(match guestcaps.gcaps_block_bus with
| Virtio_blk -> "VirtIO"
| Virtio_SCSI -> "VirtIO_SCSI"
| IDE -> "IDE");
"ovf:disk-type", "System"; (* RHBZ#744538 *)
"ovf:boot", if is_bootable_drive then "True" else "False";
Expand Down
3 changes: 1 addition & 2 deletions lib/types.ml
Expand Up @@ -422,14 +422,13 @@ type guestcaps = {
gcaps_arch : string;
gcaps_acpi : bool;
}
and guestcaps_block_type = Virtio_blk | Virtio_SCSI | IDE
and guestcaps_block_type = Virtio_blk | IDE
and guestcaps_net_type = Virtio_net | E1000 | RTL8139
and guestcaps_video_type = QXL | Cirrus
and guestcaps_machine = I440FX | Q35 | Virt

let string_of_block_type = function
| Virtio_blk -> "virtio-blk"
| Virtio_SCSI -> "virtio-scsi"
| IDE -> "ide"
let string_of_net_type = function
| Virtio_net -> "virtio-net"
Expand Down
2 changes: 1 addition & 1 deletion lib/types.mli
Expand Up @@ -282,7 +282,7 @@ type guestcaps = {
}
(** Guest capabilities after conversion. eg. Was virtio found or installed? *)

and guestcaps_block_type = Virtio_blk | Virtio_SCSI | IDE
and guestcaps_block_type = Virtio_blk | IDE
and guestcaps_net_type = Virtio_net | E1000 | RTL8139
and guestcaps_video_type = QXL | Cirrus
and guestcaps_machine = I440FX | Q35 | Virt
Expand Down
1 change: 0 additions & 1 deletion output/create_json.ml
Expand Up @@ -195,7 +195,6 @@ let create_json_metadata source inspect
let block_bus =
match guestcaps.gcaps_block_bus with
| Virtio_blk -> "virtio-blk"
| Virtio_SCSI -> "virtio-scsi"
| IDE -> "ide" in
let net_bus =
match guestcaps.gcaps_net_bus with
Expand Down
7 changes: 0 additions & 7 deletions output/openstack_image_properties.ml
Expand Up @@ -35,7 +35,6 @@ let create source inspect { target_buses; guestcaps; target_firmware } =
"hw_disk_bus",
(match guestcaps.gcaps_block_bus with
| Virtio_blk -> "virtio"
| Virtio_SCSI -> "scsi"
| IDE -> "ide");
"hw_vif_model",
(match guestcaps.gcaps_net_bus with
Expand Down Expand Up @@ -73,12 +72,6 @@ let create source inspect { target_buses; guestcaps; target_firmware } =
List.push_back properties ("hw_cpu_threads", string_of_int threads);
);

(match guestcaps.gcaps_block_bus with
| Virtio_SCSI ->
List.push_back properties ("hw_scsi_model", "virtio-scsi")
| Virtio_blk | IDE -> ()
);

(match inspect.i_major_version, inspect.i_minor_version with
| 0, 0 -> ()
| x, 0 -> List.push_back properties ("os_version", string_of_int x)
Expand Down

0 comments on commit f0afc43

Please sign in to comment.