[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/25] qemu-edid: use qemu_edid_size()
From: |
Gerd Hoffmann |
Subject: |
[PULL 01/25] qemu-edid: use qemu_edid_size() |
Date: |
Mon, 10 May 2021 15:20:27 +0200 |
So we only write out that part of the edid blob
which has been filled with data.
Also use a larger buffer for the blob.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20210427150824.638359-1-kraxel@redhat.com
Message-Id: <20210427150824.638359-2-kraxel@redhat.com>
---
qemu-edid.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/qemu-edid.c b/qemu-edid.c
index 1cd6a9517238..c3a9fba10dc4 100644
--- a/qemu-edid.c
+++ b/qemu-edid.c
@@ -41,7 +41,8 @@ static void usage(FILE *out)
int main(int argc, char *argv[])
{
FILE *outfile = NULL;
- uint8_t blob[256];
+ uint8_t blob[512];
+ size_t size;
uint32_t dpi = 100;
int rc;
@@ -119,7 +120,8 @@ int main(int argc, char *argv[])
memset(blob, 0, sizeof(blob));
qemu_edid_generate(blob, sizeof(blob), &info);
- fwrite(blob, sizeof(blob), 1, outfile);
+ size = qemu_edid_size(blob);
+ fwrite(blob, size, 1, outfile);
fflush(outfile);
exit(0);
--
2.31.1
- [PULL 00/25] Vga 20210510 patches, Gerd Hoffmann, 2021/05/10
- [PULL 01/25] qemu-edid: use qemu_edid_size(),
Gerd Hoffmann <=
- [PULL 02/25] edid: edid_desc_next, Gerd Hoffmann, 2021/05/10
- [PULL 03/25] edid: move xtra3 descriptor, Gerd Hoffmann, 2021/05/10
- [PULL 04/25] edid: use dta extension block descriptors, Gerd Hoffmann, 2021/05/10
- [PULL 05/25] edid: Make refresh rate configurable, Gerd Hoffmann, 2021/05/10
- [PULL 06/25] edid: move timing generation into a separate function, Gerd Hoffmann, 2021/05/10
- [PULL 08/25] edid: add support for DisplayID extension (5k resolution), Gerd Hoffmann, 2021/05/10
- [PULL 07/25] edid: allow arbitrary-length checksums, Gerd Hoffmann, 2021/05/10
- [PULL 10/25] virtio-gpu: rename virgl source file., Gerd Hoffmann, 2021/05/10
- [PULL 11/25] virtio-gpu: add virtio-gpu-gl-device, Gerd Hoffmann, 2021/05/10
- [PULL 12/25] virtio-gpu: move virgl realize + properties, Gerd Hoffmann, 2021/05/10