59 lines
1.7 KiB
Diff
59 lines
1.7 KiB
Diff
|
|
From 185f3887a17ed6f35d67934a8583096de0713168 Mon Sep 17 00:00:00 2001
|
||
|
|
From: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
||
|
|
Date: Sat, 12 Oct 2024 08:53:40 +0000
|
||
|
|
Subject: [PATCH] chardev/baum: Replace magic values by X_MAX / Y_MAX
|
||
|
|
definitions mainline inclusion commit
|
||
|
|
f63a6e381c48b796c3964accaa88c0d0e229b17f category: bugfix
|
||
|
|
MIME-Version: 1.0
|
||
|
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
Content-Transfer-Encoding: 8bit
|
||
|
|
|
||
|
|
---------------------------------------------------------------
|
||
|
|
|
||
|
|
Replace '84' magic value by the X_MAX definition, and '1' by Y_MAX.
|
||
|
|
|
||
|
|
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||
|
|
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||
|
|
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||
|
|
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
||
|
|
Message-id: 20220819153931.3147384-2-peter.maydell@linaro.org
|
||
|
|
|
||
|
|
Signed-off-by: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
||
|
|
---
|
||
|
|
chardev/baum.c | 11 +++++++----
|
||
|
|
1 file changed, 7 insertions(+), 4 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/chardev/baum.c b/chardev/baum.c
|
||
|
|
index 79d618e350..6d538808a0 100644
|
||
|
|
--- a/chardev/baum.c
|
||
|
|
+++ b/chardev/baum.c
|
||
|
|
@@ -87,6 +87,9 @@
|
||
|
|
|
||
|
|
#define BUF_SIZE 256
|
||
|
|
|
||
|
|
+#define X_MAX 84
|
||
|
|
+#define Y_MAX 1
|
||
|
|
+
|
||
|
|
struct BaumChardev {
|
||
|
|
Chardev parent;
|
||
|
|
|
||
|
|
@@ -244,11 +247,11 @@ static int baum_deferred_init(BaumChardev *baum)
|
||
|
|
brlapi_perror("baum: brlapi__getDisplaySize");
|
||
|
|
return 0;
|
||
|
|
}
|
||
|
|
- if (baum->y > 1) {
|
||
|
|
- baum->y = 1;
|
||
|
|
+ if (baum->y > Y_MAX) {
|
||
|
|
+ baum->y = Y_MAX;
|
||
|
|
}
|
||
|
|
- if (baum->x > 84) {
|
||
|
|
- baum->x = 84;
|
||
|
|
+ if (baum->x > X_MAX) {
|
||
|
|
+ baum->x = X_MAX;
|
||
|
|
}
|
||
|
|
|
||
|
|
con = qemu_console_lookup_by_index(0);
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|