[PATCH spice-gtk v2 26/33] fixup! usb-redir: add implementation of emulated CD device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix style indentation
---
 src/usb-device-cd.c | 71 ++++++++++++++++++++++-----------------------
 1 file changed, 35 insertions(+), 36 deletions(-)

diff --git a/src/usb-device-cd.c b/src/usb-device-cd.c
index 3c57185f..b03d6838 100644
--- a/src/usb-device-cd.c
+++ b/src/usb-device-cd.c
@@ -461,27 +461,26 @@ static gboolean usb_cd_get_descriptor(UsbCd *d, uint8_t type, uint8_t index,
     void *p = NULL;
     uint16_t len = 0;
 
-    switch (type)
-    {
-        case LIBUSB_DT_DEVICE:
-            p = &desc;
-            len = sizeof(desc);
-            break;
-        case LIBUSB_DT_CONFIG:
-            p = cfg;
-            len = sizeof(cfg);
-            break;
-        case LIBUSB_DT_STRING:
-            if (index == 0) {
-                p = s0; len = sizeof(s0);
-            } else if (index == 1) {
-                p = s1; len = sizeof(s1);
-            } else if (index == 2) {
-                p = s2; len = sizeof(s2);
-            } else if (index == 3) {
-                p = d->serial; len = sizeof(d->serial);
-            }
-            break;
+    switch (type) {
+    case LIBUSB_DT_DEVICE:
+        p = &desc;
+        len = sizeof(desc);
+        break;
+    case LIBUSB_DT_CONFIG:
+        p = cfg;
+        len = sizeof(cfg);
+        break;
+    case LIBUSB_DT_STRING:
+        if (index == 0) {
+            p = s0; len = sizeof(s0);
+        } else if (index == 1) {
+            p = s1; len = sizeof(s1);
+        } else if (index == 2) {
+            p = s2; len = sizeof(s2);
+        } else if (index == 3) {
+            p = d->serial; len = sizeof(d->serial);
+        }
+        break;
     }
 
     if (p) {
@@ -525,21 +524,21 @@ static void usb_cd_control_request(UsbCd *device,
 
     if (reqtype == (LIBUSB_REQUEST_TYPE_CLASS | LIBUSB_RECIPIENT_INTERFACE)) {
         switch (h->request) {
-            case 0xFF:
-                // mass-storage class request 'reset'
-                usb_cd_reset(device);
-                h->length = 0;
-                h->status = usb_redir_success;
-                break;
-            case 0xFE:
-                // mass-storage class request 'get max lun'
-                // returning one byte
-                if (h->length) {
-                    h->length = 1;
-                    h->status = usb_redir_success;;
-                    *buffer = &device->max_lun_index;
-                }
-                break;
+        case 0xFF:
+            // mass-storage class request 'reset'
+            usb_cd_reset(device);
+            h->length = 0;
+            h->status = usb_redir_success;
+            break;
+        case 0xFE:
+            // mass-storage class request 'get max lun'
+            // returning one byte
+            if (h->length) {
+                h->length = 1;
+                h->status = usb_redir_success;;
+                *buffer = &device->max_lun_index;
+            }
+            break;
         }
     }
 }
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]