Statistics
| Branch: | Revision:

root / qemu-char.c @ 2a2af967

History | View | Annotate | Download (74.6 kB)

# Date Author Comment
0beb4942 02/03/2012 06:41 pm Anthony Liguori

qdev: nuke qdev_init_chardev()

I'm sure the intentions were good here, but there's no reason this should be in
qdev. Move it to qemu-char where it belongs.

Signed-off-by: Anthony Liguori <>

a425d23f 11/29/2011 12:20 am Hans de Goede

qemu-char: rename qemu_chr_event to qemu_chr_be_event and make it public

Rename qemu_chr_event to qemu_chr_be_event, since it is only to be
called by backends and make it public so that it can be used by chardev
code which lives outside of qemu-char.c

Signed-off-by: Hans de Goede <>...

a4e26048 11/11/2011 08:49 pm Markus Armbruster

qemu-char: Plug memory leak on qemu_chr_open_pty() error path

Spotted by Coverity.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

db418a0a 10/23/2011 06:44 pm Fabien Chouteau

Add stdio char device on windows

Simple implementation of an stdio char device on Windows.

Signed-off-by: Fabien Chouteau <>
Signed-off-by: Blue Swirl <>

2e02e18b 10/14/2011 04:38 pm Stefan Weil

qemu-char: Fix use of free() instead of g_free()

cppcheck reported these errors:

qemu-char.c:1667: error: Mismatching allocation and deallocation: s
qemu-char.c:1668: error: Mismatching allocation and deallocation: chr
qemu-char.c:1769: error: Mismatching allocation and deallocation: s...

c5a415a0 10/04/2011 05:02 pm Luiz Capitulino

qapi: Convert query-chardev

Reviewed-by: Michael Roth <>
Tested-by: Michael Roth <>
Signed-off-by: Anthony Liguori <>
Signed-off-by: Luiz Capitulino <>

069c159e 09/23/2011 09:42 pm Marcelo Tosatti

qemu-char: use qemu_set_fd_handler/2 consistently

Now that qemu_set_fd_handler and qemu_set_fd_handler2 have different
implementations, one using qemu iohandlers and the other glib, it is not
safe to mix the two when inserting/deleting handlers.

Fixes kvm-autotest....

74c0d6f0 08/22/2011 06:17 pm Anthony Liguori

char: rename qemu_chr_get_msgfd() -> qemu_chr_fe_get_msgfd()

Signed-off-by: Anthony Liguori <>

903396ad 08/22/2011 06:17 pm Anthony Liguori

char: remove qemu_chr_send_event()

It's dead code.

Signed-off-by: Anthony Liguori <>

27143a44 08/22/2011 06:17 pm Anthony Liguori

char: rename qemu_chr_open() -> qemu_chr_new()

Signed-off-by: Anthony Liguori <>

f69554b9 08/22/2011 06:17 pm Anthony Liguori

char: qemu_chr_open_opts() -> qemu_chr_new_from_opts()

Signed-off-by: Anthony Liguori <>

70f24fb6 08/22/2011 06:17 pm Anthony Liguori

char: rename qemu_chr_close() -> qemu_chr_delete()

Signed-off-by: Anthony Liguori <>

41084f1b 08/22/2011 06:17 pm Anthony Liguori

char: qemu_chr_ioctl() -> qemu_chr_fe_ioctl()

Signed-off-by: Anthony Liguori <>

15f31519 08/22/2011 06:17 pm Anthony Liguori

char: rename qemu_chr_set_echo() -> qemu_chr_fe_set_echo()

Signed-off-by: Anthony Liguori <>

fa5efccb 08/22/2011 06:17 pm Anthony Liguori

char: rename qemu_chr_read() -> qemu_chr_be_write()

Signed-off-by: Anthony Liguori <>

909cda12 08/22/2011 06:17 pm Anthony Liguori

char: rename qemu_chr_can_read() -> qemu_chr_be_can_read()

Signed-off-by: Anthony Liguori <>

c9d830ed 08/22/2011 06:17 pm Anthony Liguori

char: rename qemu_chr_guest_open() -> qemu_chr_fe_open()

Signed-off-by: Anthony Liguori <>

2817822d 08/22/2011 06:17 pm Anthony Liguori

char: rename qemu_chr_guest_close() -> qemu_chr_fe_close()

Signed-off-by: Anthony Liguori <>

2cc6e0a1 08/22/2011 06:17 pm Anthony Liguori

char: rename qemu_chr_write() -> qemu_chr_fe_write()

Signed-off-by: Anthony Liguori <>

e7e71b0e 08/22/2011 06:17 pm Anthony Liguori

char: rename qemu_chr_printf() -> qemu_chr_fe_printf()

Signed-off-by: Anthony Liguori <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

00aa0040 07/25/2011 05:38 pm Blue Swirl

Wrap recv to avoid warnings

Avoid warnings like these by wrapping recv():
CC slirp/ip_icmp.o
/src/qemu/slirp/ip_icmp.c: In function 'icmp_receive':
/src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror]...

aad04cd0 07/24/2011 05:48 pm Blue Swirl

Fix chrdev return value conversion

6e1db57b2ac9025c2443c665a0d9e78748637b26 didn't
convert brlapi or win32 chrdevs, breaking build for those.

Fix by converting the chrdevs.

Acked-by: Kevin Wolf <>
Signed-off-by: Blue Swirl <>

13661089 07/23/2011 07:19 pm Daniel P. Berrange

Introduce a 'client_add' monitor command accepting an open FD

Allow client connections for VNC and socket based character
devices to be passed in over the monitor using SCM_RIGHTS.

One intended usage scenario is to start QEMU with VNC on a
UNIX domain socket. An unprivileged user which cannot access...

6e1db57b 07/23/2011 07:18 pm Kevin Wolf

qemu-char: Print strerror message on failure

The only way for chardev drivers to communicate an error was to return a NULL
pointer, which resulted in an error message that said that something went
wrong, but not why.

This patch changes the interface to return 0/-errno and updates...

9bf0960a 06/08/2011 11:04 am Alexandre Raymond

Fix compilation warning due to missing header for sigaction (followup)

This patch removes all references to signal.h when qemu-common.h is included
as they become redundant.

Signed-off-by: Alexandre Raymond <>
Signed-off-by: Stefan Hajnoczi <>

da7d998b 04/28/2011 08:41 am Amit Shah

char: Detect chardev release by NULL handlers as well as NULL opaque

Juan says he prefers these extra checks to ensure a user of a chardev is
releasing it.

Requested-by: Juan Quintela <>
Signed-off-by: Amit Shah <>

d5b27167 04/28/2011 08:33 am Kusanagi Kouichi

char: Allow devices to use a single multiplexed chardev.

This fixes regression caused by commit
2d6c1ef40f3678ab47a4d14fb5dadaa486bfcda6
("char: Prevent multiple devices opening same chardev"):

-nodefaults -nographic -chardev stdio,id=stdio,mux=on,signal=off \...

7c32c4fe 04/28/2011 08:32 am Hans de Goede

chardev: Allow frontends to notify backends of guest open / close

Some frontends know when the guest has opened the "channel" and is actively
listening to it, for example virtio-serial. This patch adds 2 new qemu-chardev
functions which can be used by frontends to signal guest open / close, and...

56d7a964 03/24/2011 03:11 pm Anthony Liguori

Merge remote branch 'amit/for-anthony' into staging

2d6c1ef4 03/21/2011 01:27 pm Amit Shah

char: Prevent multiple devices opening same chardev

Prevent:

-chardev socket,path=/tmp/foo,server,nowait,id=c0 \
-device virtserialport,chardev=c0,id=vs0 \
-device virtserialport,chardev=c0,id=vs1

Reported-by: Mike Cao <>
Signed-off-by: Amit Shah <>

7bd427d8 03/21/2011 10:23 am Paolo Bonzini

change all rt_clock references to use millisecond resolution accessors

This was done with:

sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \
$(git grep -l 'get_clock\>.*rt_clock' )
sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \...
e0efb993 03/20/2011 11:39 pm Stefan Weil

Fix conversions from pointer to int and vice versa

Here the int values fds0, sigfd, s, sock and fd are converted
to void pointers which are later converted back to an int value.

These conversions should always use intptr_t instead of unsigned long.

They are needed for environments where sizeof(long) != sizeof(void *)....

1bbd185f 02/20/2011 07:26 pm Stefan Hajnoczi

qemu-char: Check for missing backend name

Check if the backend option is missing before searching the backend
table. This fixes a NULL pointer dereference when QEMU is invoked with
the following invalid command-line:

$ qemu -chardev id=foo,path=/tmp/socket...
363f8cb9 02/02/2011 12:50 am Paolo Bonzini

fix QemuOpts leak

Now that no backend's open function saves the passed QemuOpts, fix a leak
in the qemu_chr_open backwards-compatible parser.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

d55dbc3a 02/02/2011 12:50 am Paolo Bonzini

remove broken code for tty

This code is taking the settings for a serial port and moving it to
fd 0 when qemu exits. This is likely just cut-and-paste, rip it.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

c48855e1 02/02/2011 12:50 am Paolo Bonzini

add qemu_chr_set_echo

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

0369364b 02/02/2011 12:50 am Paolo Bonzini

move atexit(term_exit) and O_NONBLOCK to qemu_chr_open_stdio

In the next patch, term_init will be changed to enable or disable
echo at will. Move extraneous stuff out of it.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

bb002513 02/02/2011 12:50 am Paolo Bonzini

add set_echo implementation for qemu_chr_stdio

This also requires moving QemuOpts out of term_init.

Clearing ISIG is independent of whether echo is enabled or disabled.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

cbcc6336 01/24/2011 04:41 pm Alon Levy

spice: add chardev (v5)

Adding a chardev backend for spice, where spice determines what
to do with it based on the name attribute given during chardev creation.
For usage by spice vdagent in conjunction with a properly named
virtio-serial device, and future smartcard channel usage....

999bd67c 11/17/2010 01:52 pm Luiz Capitulino

qemu-char: Introduce Memory driver

This driver handles in-memory chardev operations. That's, all writes
to this driver are stored in an internal buffer and it doesn't talk
to the external world in any way.

Right now it's very simple: it supports only writes. But it can be...

5fc9cfed 11/03/2010 07:48 pm Jes Sorensen

Fold send_all() wrapper unix_write() into one function

The current send_all() wrapper for POSIX calls does nothing but call
unix_write(). Merge them to simplify the code.

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>

3329f07b 08/23/2010 01:11 am Gerd Hoffmann

QemuOpts: make most qemu_*_opts static

Switch tree to lookup-by-name using qemu_find_opts().
Also hook up virtfs options so qemu_find_opts works for them too.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

68c18d1c 08/15/2010 12:46 pm Blue Swirl

Fix mingw32 build

Don't define qemu_chr_open_eventfd() on Windows.

Signed-off-by: Blue Swirl <>

6cbf4c8c 08/11/2010 12:25 am Cam Macdonell

RESEND: Inter-VM shared memory PCI device

resend for bug fix related to removal of irqfd

Support an inter-vm shared memory device that maps a shared-memory object as a
PCI device in the guest. This patch also supports interrupts between guest by
communicating over a unix domain socket. This patch applies to the qemu-kvm...

6ab4b5ab 06/15/2010 10:41 am Markus Armbruster

block: Decouple block device "commit all" from DriveInfo

do_commit() and mux_proc_byte() iterate over the list of drives
defined with drive_init(). This misses host block devices defined by
other means. Such means don't exist now, but will be introduced later...

666daa68 06/04/2010 04:20 pm Markus Armbruster

blockdev: Collect block device code in new blockdev.c

Anything that moves hundreds of lines out of vl.c can't be all bad.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

637503d1 06/01/2010 09:48 pm Luiz Capitulino

Monitor: Drop QMP documentation from code

Previous commit added QMP documentation to the qemu-monitor.hx
file, it's is a copy of this information.

While it's good to keep it near code, maintaining two copies of
the same information is too hard and has little benefit as we...

e53f27b9 04/26/2010 10:36 pm Paolo Bonzini

stash away SCM_RIGHTS fd until a getfd command arrives

If there is already a fd in s->msgfd before recvmsg it is
closed by parts that this patch does not touch. So, only
one descriptor can be "leaked" by attaching it to a command
other than getfd.

Signed-off-by: Paolo Bonzini <>...

73cdf3f2 04/09/2010 11:03 pm Alexander Graf

Always notify consumers of char devices if they're open

When using virtio-console on s390, the input doesn't work.

The root of the problem is rather simple. What happens is the following:

1) create character device for stdio
2) char device is done creating, sends OPENED event...
cb301efe 04/08/2010 10:08 pm Riku Voipio

fix function signature of qemu_chr_open_pty on !linux

Signed-off-By: Riku Voipio <>
Signed-off-By: Juha Riihimäki <>
Signed-off-by: Aurelien Jarno <>

d3f822d2 03/31/2010 07:17 pm Shahar Havivi

Restore terminal monitor attributes - addition

Patch 2d753894c7553d6a05e8fdbed5f4704398919a35 was missing this check,
when running monitor as /dev/tty and other serial device, i.e:
qemu -monitor /dev/tty -serial /dev/pts/1

Without this patch any serial device will override the monitor stored...

d1839d73 03/30/2010 08:44 pm Juergen Lock

Fix some compilation warnings on FreeBSD hosts

Signed-off-by: Juergen Lock <>
Signed-off-by: Blue Swirl <>

28695489 03/21/2010 09:13 pm Anthony Liguori

Revert "Convert atexit users to exit_notifier"

This reverts commit d7234f4d7e373a708e1df9ab565a71b71b189025.

Conflicts:

hw/xen_machine_pv.c

This should have never been committed.

Signed-off-by: Anthony Liguori <>

d7234f4d 03/19/2010 10:27 pm Anthony Liguori

Convert atexit users to exit_notifier

All of these users have global state so we really don't see a benefit from
exit_notifier. However, using exit_notifier means that there's one less
justification for having global state in the first place.

Signed-off-by: Anthony Liguori <>

7b27a769 03/19/2010 10:27 pm Juan Quintela

rename IOCanRWHandler to IOCanReadHandler

It was always only used for reads

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

39324ca4 03/14/2010 11:43 pm Jan Kiszka

Fix corner case in chardev udp: parameter

The missing '' broke 'udp::<port>:<port>' parsing.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Aurelien Jarno <>

2d753894 03/09/2010 04:47 pm Shahar Havivi

Restore terminal attributes for tty based monitor

Patch http://permalink.gmane.org/gmane.comp.emulators.qemu/63472 handle
close when using tty devices (like /dev/ttyS0),
yet tty based monitor are not restoring terminal attributes (as done
with stdio based monitor), when closing qemu after that command:...

5bb59902 02/28/2010 12:50 pm Jan Kiszka

qemu-char.c: drop debug printfs from qemu_chr_parse_compat

Signed-off-by: Jan Kiszka <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Aurelien Jarno <>

4266a134 02/23/2010 12:16 am David Ahern

add close callback for tty-based char device

v1 -> v2 coding style changes

Add a tty close callback. Right now if a guest device that is connected
to a tty-based chardev in the host is removed, the tty is not closed.
With this patch it is closed.

Example use case is connecting an emulated USB serial cable in the guest...

afc535ac 02/10/2010 07:56 pm Evgeniy Dushistov

Do not ignore error, if open file failed (-serial /dev/tty)

In case, when qemu is executed with option like
-serial /dev/ttyS0, report if there are problems with
opening of devices. At now errors are silently ignoring.

Signed-off-by: Evgeniy Dushistov <>...

3b9d7e66 01/20/2010 12:31 am Kusanagi Kouichi

char: Remove redundant qemu_chr_generic_open() call.

qemu_chr_open_fd() calls qemu_chr_generic_open(),
so qemu_chr_open_tty() doesn't need to call it.

Signed-off-by: Kusanagi Kouichi <>
Signed-off-by: Anthony Liguori <>

588b3832 12/12/2009 03:59 pm Luiz Capitulino

char: Convert qemu_chr_info() to QObject

Each device is represented by a QDict. The returned QObject is a QList
of all devices.

This commit should not change user output.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

33521634 12/12/2009 03:59 pm Gerd Hoffmann

un-static qemu_chr_parse_compat()

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

40ff6d7e 12/03/2009 07:45 pm Kevin Wolf

Don't leak file descriptors

We're leaking file descriptors to child processes. Set FD_CLOEXEC on file
descriptors that don't need to be passed to children to stop this misbehaviour.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

bbe813a2 11/30/2009 04:42 pm Aurelien Jarno

Fix commit a167ba50851cdac2fa36633587e98c5956cd6b18

Signed-off-by: Aurelien Jarno <>

a167ba50 11/29/2009 07:00 pm Aurelien Jarno

Add support for GNU/kFreeBSD

Signed-off-by: Aurelien Jarno <>

127338e6 11/17/2009 04:03 pm Amit Shah

char: rename qemu_chr_reset to qemu_chr_generic_open

This function sends out the OPENED event to backends that
have drive the chardevs. The 'reset' is now a historical
artifact and we can now just call the function for what it
is.

Signed-off-by: Amit Shah <>...

9bd7854e 11/17/2009 04:03 pm Amit Shah

char: don't limit data sent to backends to 1k per buffer

chardevs have a 'can_read' function via which backends specify
the amount of data they can receive. When can_read returns > 0,
apps can start sending data. However, each chardev driver here
allows a max. of 1k bytes inspite of the backend being able to...

57e073a3 11/17/2009 04:03 pm Amit Shah

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...

45eea13b 10/30/2009 03:39 pm Stefan Weil

serial: Support additional serial speed values

  • Allow any speed value which is defined for Linux
    (and possibly other systems).
  • Compare int values instead of double values.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

f7cbc08f 10/27/2009 07:29 pm Anthony Liguori

Revert "char: emit the OPENED event only when a new char connection is opened"

This reverts commit 6cfa64de908d67fb6f6b6e3ae4888dd863f69e44.

This breaks the monitor prompt. Proper fix will come from Amit.

Signed-off-by: Anthony Liguori <>

1abb8172 10/27/2009 07:28 pm Mark McLoughlin

net: remove unused includes of if_tun.h and if_tap.h

Looks like these are just artifacts of vl.c being split up.

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

5989020b 10/27/2009 07:28 pm Kusanagi Kouichi

Add chardev option to disable signal.

If I am using vga and serial which is stdio and hit C-c on
serial console, qemu terminates. That is annoying for me.
So make it configurable whether signal is generated when C-c is hit.

Signed-off-by: Kusanagi Kouichi <>...

69795d67 10/21/2009 09:35 pm Amit Shah

char: check for initial_reset_issued unnecessary

At init, qemu_chr_reset is always called with initial_reset_issued set to 1.
So checking for it to be set is not necessary.

Patchworks-ID: 35286
Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

b6b8df56 10/21/2009 09:35 pm Amit Shah

char: rename CHR_EVENT_RESET to CHR_EVENT_OPENED

The char event RESET is emitted when a char device is opened.
Give it a better name.

Patchworks-ID: 35287
Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

6cfa64de 10/21/2009 09:35 pm Amit Shah

char: emit the OPENED event only when a new char connection is opened

The OPENED event gets sent also when qemu resets its state initially.
The consumers of the event aren't interested in receiving this event
on reset.

Patchworks-ID: 35288
Signed-off-by: Amit Shah <>...

72cf2d4f 09/12/2009 10:36 am Blue Swirl

Fix sys-queue.h conflict for good

Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...

d6c983cd 09/11/2009 06:19 pm Gerd Hoffmann

convert windows console chardev to QemuOpts.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

48b76496 09/11/2009 06:19 pm Gerd Hoffmann

convert tty + parport chardevs to QemuOpts.

new cmd line syntax:
-chardev tty,id=name,path=/dev/tty*
-chardev parport,id=name,path=/dev/parport*

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

6ea314d9 09/11/2009 06:19 pm Gerd Hoffmann

convert vc chardev to QemuOpts.

new cmd line syntax:
-chardev vc,id=name
-chardev vc,id=name,width=pixels,height=pixels
-chardev vc,id=name,cols=chars,rows=chars

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

7591c5c1 09/11/2009 06:19 pm Gerd Hoffmann

convert mux chardev to QemuOpts.

new cmd line syntax: you can add mux=1 to any chardev to enable muxing,
then attach it multiple times, like this:

-chardev pty,name=mux,mux=on

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

7e1b35b4 09/11/2009 06:19 pm Gerd Hoffmann

convert udp chardev to QemuOpts.

While being at it: create a new inet_dgram_opts() function for udp setup,
so udp can handle IPv6 now.

new cmd line syntax:
-chardev udp,id=name,host=remotehost,port=remoteport,\
localaddr=bindaddr,localport=bindport...

c845f401 09/11/2009 06:19 pm Gerd Hoffmann

Allow -serial chardev:<name>

Lets put -chardev into use now. With this patch applied chardev:name is
accepted as chardev specification everywhere, i.e. now you can:

-chardev stdio,id=ttyS0
-serial chardev:ttyS0

which does the same as '-serial stdio"....

a7aec5da 09/11/2009 06:19 pm Gerd Hoffmann

monitor: fix muxing

make the mux driver send mux_in and mux_out events when switching
focus while hooking up more handlers.

stop using CharDriverState->focus in monitor.c, track state using
the mux events instead. This also removes the implicit assumtion...

799f1f23 09/11/2009 06:19 pm Gerd Hoffmann

move mux focus field from CharDriverState to MuxDriver

Now that monitor stopped using focus we can make it internal
to the mux driver.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

aeb2c47a 09/11/2009 06:19 pm Gerd Hoffmann

convert unix+tcp chardevs to QemuOpts.

new cmd line syntax:
unix socket:
-chardev socket,id=name,path=/path/to/socket
tcp socket:
-chardev socket,id=name,host=hostaddr|ipaddr,port=portnr

server and nowait options work as usual. Alternatively you can use...

4490dadf 09/11/2009 06:19 pm Gerd Hoffmann

convert pty chardev to QemuOpts.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

3c17affb 09/11/2009 06:19 pm Gerd Hoffmann

convert stdio chardev to QemuOpts.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

f0457e8d 09/11/2009 06:19 pm Gerd Hoffmann

convert msmouse chardev to QemuOpts.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

dc1c21e6 09/11/2009 06:19 pm Gerd Hoffmann

convert braille chardev to QemuOpts.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

191bc01b 09/11/2009 06:19 pm Gerd Hoffmann

switch chardev to QemuOpts: infrastructure, null device

start switching chardevs to QemuOpts. This patch adds the
infrastructure and converts the null device.

The patch brings two new functions:

qemu_chr_open_opts()
same as qemu_chr_open(), but uses QemuOpts instead of a...

7d31544f 09/11/2009 06:19 pm Gerd Hoffmann

convert file+pipe chardevs to QemuOpts.

new cmd line syntax:
-chardev file,id=name,path=/path/to/file
-chardev pipe,id=name,path=/path/to/pipe

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

793cbfb5 08/24/2009 04:21 pm Amit Shah

char: Emit 'CLOSED' events on char device close

Notify users of the char interface whenever the file / connection is
closed.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

7cba04f6 08/01/2009 01:13 pm Blue Swirl

More NULL pointer fixes

Signed-off-by: Blue Swirl <>

73bcc2ac 07/27/2009 10:55 pm Anthony Liguori

Fix typo WIN32 -> _WIN32

This was spotted by Juan Quintela

Signed-off-by: Anthony Liguori <>

71e72a19 07/27/2009 10:09 pm Juan Quintela

rename HOST_BSD to CONFIG_BSD

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

751c6a17 07/27/2009 10:08 pm Gerd Hoffmann

kill drives_table

First step cleaning up the drives handling. This one does nothing but
removing drives_table[], still it became seriously big.

drive_get_index() is gone and is replaced by drives_get() which hands
out DriveInfo pointers instead of a table index. This needs adaption in...

7d174059 07/27/2009 04:39 pm Mark McLoughlin

Add SCM_RIGHTS support to unix socket character devices

If a file descriptor is passed via a message with SCM_RIGHTS ancillary
data on a unix socket, store the file descriptor for use in the
chr_read() handler. Close the file descriptor if it was not used....

9977c894 07/27/2009 04:39 pm Mark McLoughlin

Make tcp_chr_read() use recvmsg()

Split out tcp_chr_recv() out of tcp_chr_read() and implement it on
non-win32 using recvmsg(). This is needed for a subsequent patch
which implements SCM_RIGHTS support.

Signed-off-by: Mark McLoughlin <>...