mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix sandbox ./barebox --help by reverting 6b082cfe (fix printf warnings)
@ 2011-05-14 21:29 Peter Korsgaard
  2011-05-26  8:02 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Korsgaard @ 2011-05-14 21:29 UTC (permalink / raw)
  To: barebox, mkl

While getting rid of all the format(barebox_printf) warnings was nice,
it caused the printf calls in arch/sandbox/os/common.c to get directed
to the barebox versions rather than the libc ones causing a crash:

E.G. before this revert:
nm -a barebox|grep -w printf
0000000000404fa3 T print

And after:
nm -a barebox|grep -w printf
U printf@@GLIBC_2.2.5

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 include/stdio.h |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/include/stdio.h b/include/stdio.h
index 9b1f161..c824764 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -8,9 +8,6 @@
  * STDIO based functions (can always be used)
  */
 
-#define ORIG_printf	printf
-#undef printf
-
 /* serial stuff */
 void	serial_printf(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
 
@@ -63,6 +60,4 @@ int	fputc(int file, const char c);
 int	ftstc(int file);
 int	fgetc(int file);
 
-#define printf			ORIG_printf
-
 #endif /* __STDIO_H */
-- 
1.7.4.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] Fix sandbox ./barebox --help by reverting 6b082cfe (fix printf warnings)
  2011-05-14 21:29 [PATCH] Fix sandbox ./barebox --help by reverting 6b082cfe (fix printf warnings) Peter Korsgaard
@ 2011-05-26  8:02 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2011-05-26  8:02 UTC (permalink / raw)
  To: barebox, s.hauer

>>>>> "Peter" == Peter Korsgaard <jacmet@sunsite.dk> writes:

 Peter> While getting rid of all the format(barebox_printf) warnings was nice,
 Peter> it caused the printf calls in arch/sandbox/os/common.c to get directed
 Peter> to the barebox versions rather than the libc ones causing a crash:

 Peter> E.G. before this revert:
 Peter> nm -a barebox|grep -w printf
 Peter> 0000000000404fa3 T print

 Peter> And after:
 Peter> nm -a barebox|grep -w printf
 Peter> U printf@@GLIBC_2.2.5

 Peter> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

Ping?

 Peter> ---
 Peter>  include/stdio.h |    5 -----
 Peter>  1 files changed, 0 insertions(+), 5 deletions(-)

 Peter> diff --git a/include/stdio.h b/include/stdio.h
 Peter> index 9b1f161..c824764 100644
 Peter> --- a/include/stdio.h
 Peter> +++ b/include/stdio.h
 Peter> @@ -8,9 +8,6 @@
 Peter>   * STDIO based functions (can always be used)
 Peter>   */
 
 Peter> -#define ORIG_printf	printf
 Peter> -#undef printf
 Peter> -
 Peter>  /* serial stuff */
 Peter>  void	serial_printf(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
 
 Peter> @@ -63,6 +60,4 @@ int	fputc(int file, const char c);
 Peter>  int	ftstc(int file);
 Peter>  int	fgetc(int file);
 
 Peter> -#define printf			ORIG_printf
 Peter> -
 Peter>  #endif /* __STDIO_H */
 Peter> -- 
 Peter> 1.7.4.4

-- 
Bye, Peter Korsgaard

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2011-05-26  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-14 21:29 [PATCH] Fix sandbox ./barebox --help by reverting 6b082cfe (fix printf warnings) Peter Korsgaard
2011-05-26  8:02 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox