]> git.proxmox.com Git - qemu.git/commitdiff
qemu-char: Rename opened to be_open
authorHans de Goede <hdegoede@redhat.com>
Tue, 26 Mar 2013 10:07:53 +0000 (11:07 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 27 Mar 2013 15:26:48 +0000 (10:26 -0500)
Rename the opened variable to be_open to reflect that it contains the
opened state of the backend.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Message-id: 1364292483-16564-2-git-send-email-hdegoede@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/usb/dev-serial.c
hw/usb/redirect.c
include/char/char.h
qemu-char.c
spice-qemu-char.c

index 47ac8c9b69d1b63b35f39674bc4dc3846c7b56a9..7c314dc59dc4e8ded42edbbc37e7c0f65a014866 100644 (file)
@@ -495,7 +495,7 @@ static int usb_serial_initfn(USBDevice *dev)
                           usb_serial_event, s);
     usb_serial_handle_reset(dev);
 
-    if (s->cs->opened && !dev->attached) {
+    if (s->cs->be_open && !dev->attached) {
         usb_device_attach(dev);
     }
     return 0;
index c519b9b92a650429a8da7fbf3dc83ca294dbdf71..9734e426ecee86c323cc2861a8bde29617ded670 100644 (file)
@@ -258,7 +258,7 @@ static int usbredir_write(void *priv, uint8_t *data, int count)
 {
     USBRedirDevice *dev = priv;
 
-    if (!dev->cs->opened) {
+    if (!dev->cs->be_open) {
         return 0;
     }
 
index 5c3a7a57564d3c4aa1be0cc95de2fa28d5689c40..90443fce3a8bab604b25c792940cc0aabac5b298 100644 (file)
@@ -74,7 +74,7 @@ struct CharDriverState {
     int idle_tag;
     char *label;
     char *filename;
-    int opened;
+    int be_open;
     int avail_connections;
     QemuOpts *opts;
     QTAILQ_ENTRY(CharDriverState) next;
index 936150fa73d6568b291f3a1f26cf7ed558c30280..441981771572803ba6088d787534025073700912 100644 (file)
@@ -108,10 +108,10 @@ void qemu_chr_be_event(CharDriverState *s, int event)
     /* Keep track if the char device is open */
     switch (event) {
         case CHR_EVENT_OPENED:
-            s->opened = 1;
+            s->be_open = 1;
             break;
         case CHR_EVENT_CLOSED:
-            s->opened = 0;
+            s->be_open = 0;
             break;
     }
 
@@ -234,7 +234,7 @@ void qemu_chr_add_handlers(CharDriverState *s,
 
     /* We're connecting to an already opened device, so let's make sure we
        also get the open event */
-    if (s->opened) {
+    if (s->be_open) {
         qemu_chr_generic_open(s);
     }
 }
index 8a9236d0a88600be02860a0363b47f00a0ca6839..c39095b438b8df7f8014b0f12ad55babcc6bb201 100644 (file)
@@ -100,8 +100,8 @@ static void vmc_state(SpiceCharDeviceInstance *sin, int connected)
     }
 #endif
 
-    if ((scd->chr->opened && connected) ||
-        (!scd->chr->opened && !connected)) {
+    if ((scd->chr->be_open && connected) ||
+        (!scd->chr->be_open && !connected)) {
         return;
     }