[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] dprintf implementation
From: |
Vincent Pelletier |
Subject: |
[PATCH] dprintf implementation |
Date: |
Mon, 21 Feb 2005 22:04:42 +0100 |
User-agent: |
Debian Thunderbird 1.0 (X11/20050116) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello.
I haven't worked on grub2 for 2 weeks now, sorry.
Here is the dprintf function I worked on 2 weeks ago, which I fixed this
evening.
Vincent Pelletier
2005-02-21 Vincent Pelletier <address@hidden>
* include/grub/misc.h (grub_dprintf): New macro.
(grub_real_dprintf): New prototype.
* kern/misc.c (grub_real_dprintf): New function.
Index: kern/misc.c
===================================================================
RCS file: /cvsroot/grub/grub2/kern/misc.c,v
retrieving revision 1.18
diff -u -p -r1.18 misc.c
- --- kern/misc.c 19 Feb 2005 20:56:07 -0000 1.18
+++ kern/misc.c 21 Feb 2005 20:38:38 -0000
@@ -128,6 +128,18 @@ grub_printf (const char *fmt, ...)
~ return ret;
~ }
+void
+grub_real_dprintf(const char *file, const int line, const char *title,
+ const char *fmt, ...)
+{
+ va_list args;
+
+ grub_printf ("%s,%d (%s): ", file, line, title);
+ va_start (args, fmt);
+ grub_vprintf (fmt, args);
+ va_end (args);
+}
+
~ int
~ grub_vprintf (const char *fmt, va_list args)
~ {
Index: include/grub/misc.h
===================================================================
RCS file: /cvsroot/grub/grub2/include/grub/misc.h,v
retrieving revision 1.12
diff -u -p -r1.12 misc.h
- --- include/grub/misc.h 29 Jan 2005 22:01:53 -0000 1.12
+++ include/grub/misc.h 21 Feb 2005 20:38:38 -0000
@@ -26,6 +26,7 @@
~ #include <grub/symbol.h>
~ #include <grub/err.h>
+#define grub_dprintf(title,fmt,args...)
grub_real_dprintf(__FILE__,__LINE__,title,fmt,args);
~ /* XXX: If grub_memmove is too slow, we must implement grub_memcpy. */
~ #define grub_memcpy(d,s,n) grub_memmove ((d), (s), (n))
@@ -58,6 +59,10 @@ char *EXPORT_FUNC(grub_strndup) (const c
~ void *EXPORT_FUNC(grub_memset) (void *s, int c, grub_size_t n);
~ grub_size_t EXPORT_FUNC(grub_strlen) (const char *s);
~ int EXPORT_FUNC(grub_printf) (const char *fmt, ...) __attribute__
((format (printf, 1, 2)));
+void EXPORT_FUNC(grub_real_dprintf) (const char *file,
+ const int line,
+ const char *title,
+ const char *fmt, ...)
__attribute__ ((format (printf, 4, 5)));
~ int EXPORT_FUNC(grub_vprintf) (const char *fmt, va_list args);
~ int EXPORT_FUNC(grub_sprintf) (char *str, const char *fmt, ...)
__attribute__ ((format (printf, 2, 3)));
~ int EXPORT_FUNC(grub_vsprintf) (char *str, const char *fmt, va_list args);
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCGkzqFEQoKRQyjtURAokmAJ9Mirp8xseh2AwUJOl+tykvKm/lHgCeM07L
2pNw3UbeFYot+LOR4vDFWH4=
=+3BC
-----END PGP SIGNATURE-----
- [PATCH] dprintf implementation,
Vincent Pelletier <=
- Re: [PATCH] dprintf implementation, Hollis Blanchard, 2005/02/23
- Re: [PATCH] dprintf implementation, Vincent Pelletier, 2005/02/24
- Re: [PATCH] dprintf implementation, Aki Tossavainen, 2005/02/24
- Re: [PATCH] dprintf implementation, Yoshinori K. Okuji, 2005/02/24
- Re: [PATCH] dprintf implementation, Vincent Pelletier, 2005/02/24
- Re: [PATCH] dprintf implementation, Hollis Blanchard, 2005/02/24
- Re: [PATCH] dprintf implementation, Aki Tossavainen, 2005/02/25
- [PATCHv2] dprintf implementation, Vincent Pelletier, 2005/02/25
- Re: [PATCHv2] dprintf implementation, Hollis Blanchard, 2005/02/25
- Re: [PATCHv2] dprintf implementation, Aki Tossavainen, 2005/02/25