[PATCH] Fixes printk so it prints very large strings

Fixes printk function so it can print very large strings. This patch does allow me to see the full bootscript in the serial console. Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Index: arch/ppc/qemu/qemu.c =================================================================== --- arch/ppc/qemu/qemu.c (revision 1335) +++ arch/ppc/qemu/qemu.c (working copy) @@ -56,7 +56,7 @@ int printk( const char *fmt, ... ) { - char *p, buf[1024]; + char *p, buf[10024]; va_list args; int i;

On 28/04/15 03:30, Programmingkid wrote:
Fixes printk function so it can print very large strings. This patch does allow me to see the full bootscript in the serial console.
Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
Index: arch/ppc/qemu/qemu.c =================================================================== --- arch/ppc/qemu/qemu.c (revision 1335) +++ arch/ppc/qemu/qemu.c (working copy) @@ -56,7 +56,7 @@ int printk( const char *fmt, ... ) { - char *p, buf[1024]; + char *p, buf[10024]; va_list args; int i;
Hmmm while this is useful as a debugging aid, I'd be a bit wary of putting this into a mainstream OpenBIOS binary due to the lack of available memory to OpenBIOS. Unless anyone can come up with a better argument, I think it may just be a case of document this and move on. ATB, Mark.

On Apr 28, 2015, at 5:29 PM, Mark Cave-Ayland wrote:
On 28/04/15 03:30, Programmingkid wrote:
Fixes printk function so it can print very large strings. This patch does allow me to see the full bootscript in the serial console.
Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
Index: arch/ppc/qemu/qemu.c =================================================================== --- arch/ppc/qemu/qemu.c (revision 1335) +++ arch/ppc/qemu/qemu.c (working copy) @@ -56,7 +56,7 @@ int printk( const char *fmt, ... ) { - char *p, buf[1024]; + char *p, buf[10024]; va_list args; int i;
Hmmm while this is useful as a debugging aid, I'd be a bit wary of putting this into a mainstream OpenBIOS binary due to the lack of available memory to OpenBIOS. Unless anyone can come up with a better argument, I think it may just be a case of document this and move on.
That is only 10 KB of ram. That's not very much ram. I have booting OpenBIOS many times since the patch was implemented and have seen no problems with it.
participants (2)
-
Mark Cave-Ayland
-
Programmingkid