Statistics
| Branch: | Revision:

root / readline.c @ f487b677

History | View | Annotate | Download (13.2 kB)

# Date Author Comment
d34dc45d 05/14/2013 04:53 pm Kevin Wolf

readline: Handle xterm escape sequences for Home/End keys

This fixes the Home/End keys in the monitor using the GTK frontend.

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

c3baa5f9 01/30/2013 12:14 pm Markus Armbruster

readline: Fix unchecked strdup() by converting to g_strdup()

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Signed-off-by: Stefan Hajnoczi <>

7682e858 01/08/2013 11:00 am Nickolai Zeldovich

readline: avoid memcpy() of overlapping regions

memcpy() for overlapping regions is undefined behavior; use memmove()
instead in readline_hist_add().

[Keep tab characters since surrounding code still uses them -- Stefan]

Signed-off-by: Nickolai Zeldovich <>...

83c9089e 12/19/2012 09:31 am Paolo Bonzini

monitor: move include files to include/monitor/

Signed-off-by: Paolo Bonzini <>

fc9fa4bd 06/11/2012 11:20 pm Stefan Weil

monitor: Fix memory leak with readline completion

Each string which is shown during readline completion in the QEMU monitor
is allocated dynamically but currently never deallocated.

Add the missing loop which calls g_free for the allocated strings.

Signed-off-by: Stefan Weil <>...

8af42882 11/07/2011 10:03 am Markus Armbruster

readline: Fix buffer overrun on re-add to history

readline_hist_add() moves the history entry to the end of history. It
uses memmove() to move rs->history[idx + 1..] to rs->history[idx..].
However, its size argument is off by two array elements, so it writes...

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

3f020d70 02/08/2010 11:12 am malc

Revert "On some systems printf is a macro"

This reverts commit bc5b6004588ad17370e0416e40b4aa9cf977023b.

30bf5f46 02/08/2010 11:12 am Paolo Bonzini

cope with printf macro definition in readline.c

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

bc5b6004 02/07/2010 01:04 am malc

On some systems printf is a macro

Signed-off-by: malc <>

759754f0 06/16/2009 11:18 pm Luiz Capitulino

readline: Remove unneeded qemu_mallocz() check

qemu_mallocz() already checks for NULL returns, readline_init() doesn't
have to do it again.

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

5b0d2727 03/13/2009 05:02 pm aliguori

monitor: Provide empty command as final history entry (Jan Kiszka)

Provide an empty line as last entry in command line history, just like
bash e.g. does.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>...

2724b180 03/06/2009 01:01 am aliguori

monitor: Improve mux'ed console experience (Jan Kiszka)

Up to now, you never really knew if you already switched the console
after pressing CTRL-A C or if you mistyped it again. This patch
clarifies the situation by providing a prompt in a new line and
injecting a linebreak when switching away again. For this purpose, the...

4c36ba32 03/06/2009 01:01 am aliguori

monitor: Introduce ReadLineState (Jan Kiszka)

As another step towards decoupled monitor terminals encapsulate the
state of the readline processor in a separate data structure called
ReadLineState and adapt all interfaces appropriately. For now the
monitor continues to instantiate just a single readline state....

376253ec 03/06/2009 01:01 am aliguori

monitor: Rework API (Jan Kiszka)

Refactor the monitor API and prepare it for decoupled terminals:
term_print functions are renamed to monitor_* and all monitor services
gain a new parameter (mon) that will once refer to the monitor instance
the output is supposed to appear on. However, the argument remains...

9dd442b1 03/06/2009 01:01 am aliguori

monitor: Break out readline_show_prompt (Jan Kiszka)

Break readline_show_prompt out of readline_start so that (re-)printing
the prompt can be controlled in a more fine-grained way.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>...

1eec614b 02/06/2009 12:06 am aliguori

toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162

1d6198c3 12/13/2008 11:32 am blueswir1

Remove unnecessary trailing newlines

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6000 c046a42c-6fe2-441c-8c8c-71466251a162

cd390083 11/16/2008 03:53 pm blueswir1

Attached patch fixes a series of this warning
when compiling on NetBSD:

warning: array subscript has type 'char'

Signed-off-by: Christoph Egger <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5727 c046a42c-6fe2-441c-8c8c-71466251a162

ccf7aa52 12/17/2007 10:31 pm ths

Handle history additions properly, by Andreas Schwab.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3835 c046a42c-6fe2-441c-8c8c-71466251a162

87ecb68b 11/17/2007 07:14 pm pbrook

Break up vl.h.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162

b427c726 09/25/2007 05:45 pm ths

Improve completion in monitor, by Pascal Terjan.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3233 c046a42c-6fe2-441c-8c8c-71466251a162

3b46e624 09/17/2007 11:09 am ths

find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

c92843b5 08/26/2007 08:33 pm ths

Reset buffer pointers after CR/LF, by Jim Paris.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3145 c046a42c-6fe2-441c-8c8c-71466251a162

33fa11d4 06/25/2007 02:36 pm ths

Implement ^W in readline.c, by Michal Hanselmann.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3016 c046a42c-6fe2-441c-8c8c-71466251a162

7e2515e8 08/02/2004 12:52 am bellard

separated readline from monitor code - added password input support - added output buffer

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1034 c046a42c-6fe2-441c-8c8c-71466251a162