qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH 0/2] Trivial console_putchar() fixes
@ 2011-11-22 10:59 Markus Armbruster
  2011-11-22 10:59 ` [Qemu-trivial] [PATCH 1/2] console: Clean up confusing indentation in console_putchar() Markus Armbruster
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Markus Armbruster @ 2011-11-22 10:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Markus Armbruster (2):
  console: Clean up confusing indentation in console_putchar()
  console: Fix console_putchar() for CSI J

 console.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

-- 
1.7.6.4



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-trivial] [PATCH 1/2] console: Clean up confusing indentation in console_putchar()
  2011-11-22 10:59 [Qemu-trivial] [PATCH 0/2] Trivial console_putchar() fixes Markus Armbruster
@ 2011-11-22 10:59 ` Markus Armbruster
  2011-11-22 10:59 ` [Qemu-trivial] [PATCH 2/2] console: Fix console_putchar() for CSI J Markus Armbruster
  2011-11-23  9:48 ` [Qemu-trivial] [PATCH 0/2] Trivial console_putchar() fixes Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2011-11-22 10:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial


Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 console.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/console.c b/console.c
index f6fe441..374fcba 100644
--- a/console.c
+++ b/console.c
@@ -1009,16 +1009,16 @@ static void console_putchar(TextConsole *s, int ch)
                             console_clear_xy(s, x, y);
                         }
                     }
-                break;
+                    break;
                 }
             case 'K':
                 switch (s->esc_params[0]) {
                 case 0:
-                /* clear to eol */
-                for(x = s->x; x < s->width; x++) {
+                    /* clear to eol */
+                    for(x = s->x; x < s->width; x++) {
                         console_clear_xy(s, x, s->y);
-                }
-                break;
+                    }
+                    break;
                 case 1:
                     /* clear from beginning of line */
                     for (x = 0; x <= s->x; x++) {
@@ -1030,12 +1030,12 @@ static void console_putchar(TextConsole *s, int ch)
                     for(x = 0; x < s->width; x++) {
                         console_clear_xy(s, x, s->y);
                     }
-                break;
-            }
+                    break;
+                }
                 break;
             case 'm':
-            console_handle_escape(s);
-            break;
+                console_handle_escape(s);
+                break;
             case 'n':
                 /* report cursor position */
                 /* TODO: send ESC[row;colR */
-- 
1.7.6.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-trivial] [PATCH 2/2] console: Fix console_putchar() for CSI J
  2011-11-22 10:59 [Qemu-trivial] [PATCH 0/2] Trivial console_putchar() fixes Markus Armbruster
  2011-11-22 10:59 ` [Qemu-trivial] [PATCH 1/2] console: Clean up confusing indentation in console_putchar() Markus Armbruster
@ 2011-11-22 10:59 ` Markus Armbruster
  2011-11-23  9:48 ` [Qemu-trivial] [PATCH 0/2] Trivial console_putchar() fixes Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2011-11-22 10:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

It falls through to the code for CSI K.  "Erase Down" also does "Erase
End of Line", "Erase Up" also does "Erase Start of Line", and "Erase
Screen" also does "Erase Line".  Happens not to be visible.  Fix it
anyway.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 console.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/console.c b/console.c
index 374fcba..ce0429d 100644
--- a/console.c
+++ b/console.c
@@ -1011,6 +1011,7 @@ static void console_putchar(TextConsole *s, int ch)
                     }
                     break;
                 }
+                break;
             case 'K':
                 switch (s->esc_params[0]) {
                 case 0:
-- 
1.7.6.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-trivial] [PATCH 0/2] Trivial console_putchar() fixes
  2011-11-22 10:59 [Qemu-trivial] [PATCH 0/2] Trivial console_putchar() fixes Markus Armbruster
  2011-11-22 10:59 ` [Qemu-trivial] [PATCH 1/2] console: Clean up confusing indentation in console_putchar() Markus Armbruster
  2011-11-22 10:59 ` [Qemu-trivial] [PATCH 2/2] console: Fix console_putchar() for CSI J Markus Armbruster
@ 2011-11-23  9:48 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2011-11-23  9:48 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-trivial, qemu-devel

On Tue, Nov 22, 2011 at 11:59:05AM +0100, Markus Armbruster wrote:
> Markus Armbruster (2):
>   console: Clean up confusing indentation in console_putchar()
>   console: Fix console_putchar() for CSI J
> 
>  console.c |   19 ++++++++++---------
>  1 files changed, 10 insertions(+), 9 deletions(-)
> 
> -- 

Thanks, applied to the trivial patches -next tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches-next

Stefan


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-23  9:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 10:59 [Qemu-trivial] [PATCH 0/2] Trivial console_putchar() fixes Markus Armbruster
2011-11-22 10:59 ` [Qemu-trivial] [PATCH 1/2] console: Clean up confusing indentation in console_putchar() Markus Armbruster
2011-11-22 10:59 ` [Qemu-trivial] [PATCH 2/2] console: Fix console_putchar() for CSI J Markus Armbruster
2011-11-23  9:48 ` [Qemu-trivial] [PATCH 0/2] Trivial console_putchar() fixes Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).