2
0
Эх сурвалжийг харах

char: Remove special init_reset handling

The initial_reset sent to chardevs doesn't do much other than setting
a bool to true. Char devices are interested in the open event and
that gets sent whenever the device is opened.

Moreover, the reset logic breaks as and when qemu's bh scheduling
changes.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Amit Shah 16 жил өмнө
parent
commit
57e073a3a1
3 өөрчлөгдсөн 0 нэмэгдсэн , 11 устгасан
  1. 0 9
      qemu-char.c
  2. 0 1
      qemu-char.h
  3. 0 1
      vl.c

+ 0 - 9
qemu-char.c

@@ -128,15 +128,6 @@ void qemu_chr_reset(CharDriverState *s)
     }
 }
 
-void qemu_chr_initial_reset(void)
-{
-    CharDriverState *chr;
-
-    QTAILQ_FOREACH(chr, &chardevs, next) {
-        qemu_chr_reset(chr);
-    }
-}
-
 int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len)
 {
     return s->chr_write(s, buf, len);

+ 0 - 1
qemu-char.h

@@ -83,7 +83,6 @@ void qemu_chr_add_handlers(CharDriverState *s,
                            void *opaque);
 int qemu_chr_ioctl(CharDriverState *s, int cmd, void *arg);
 void qemu_chr_reset(CharDriverState *s);
-void qemu_chr_initial_reset(void);
 int qemu_chr_can_read(CharDriverState *s);
 void qemu_chr_read(CharDriverState *s, uint8_t *buf, int len);
 int qemu_chr_get_msgfd(CharDriverState *s);

+ 0 - 1
vl.c

@@ -5790,7 +5790,6 @@ int main(int argc, char **argv, char **envp)
     }
 
     text_consoles_set_display(display_state);
-    qemu_chr_initial_reset();
 
     for (i = 0; i < MAX_MONITOR_DEVICES; i++) {
         if (monitor_devices[i] && monitor_hds[i]) {