libxl: remove impossible check for backend != DISK_BACKEND_QDISK
authorIan Campbell <ian.campbell@citrix.com>
Fri, 8 Apr 2011 15:38:06 +0000 (16:38 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 8 Apr 2011 15:38:06 +0000 (16:38 +0100)
In this case we are already in the DISK_BACKEND_QDISK case of a switch
statement on the same variable.

It is possible that we fell through from the DISK_BACKEND_TAP case
(although I'm about to remove that in a subsequent patch), however in
that case we are explicitly falling back from blktap2 to qdisk so
DEVICE_QDISK is still the right answer.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.c

index 021959aded3351023a6703d53eef22fef97ffcb3..1d4bff3871151c2c71e2d3a653b8ad1536be6624 100644 (file)
@@ -1016,12 +1016,7 @@ int libxl_device_disk_add(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *dis
             flexarray_append(back, "params");
             flexarray_append(back, libxl__sprintf(&gc, "%s:%s",
                           libxl__device_disk_string_of_format(disk->format), disk->pdev_path));
-
-            if (libxl__blktap_enabled(&gc) && 
-                 disk->backend != DISK_BACKEND_QDISK)
-                device.backend_kind = DEVICE_TAP;
-            else
-                device.backend_kind = DEVICE_QDISK;
+            device.backend_kind = DEVICE_QDISK;
             break;
         default:
             LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "unrecognized disk backend type: %d\n", disk->backend);