All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Pelletier <subdino2004@yahoo.fr>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [PATCH] dprintf implementation
Date: Mon, 21 Feb 2005 22:04:42 +0100	[thread overview]
Message-ID: <421A4CEA.5030603@yahoo.fr> (raw)

-----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  <subdino2004@yahoo.fr>

	* 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-----





             reply	other threads:[~2005-02-21 21:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-21 21:04 Vincent Pelletier [this message]
2005-02-23 23:11 ` [PATCH] dprintf implementation Hollis Blanchard
2005-02-24  8:02   ` Vincent Pelletier
2005-02-24  8:49     ` Aki Tossavainen
2005-02-24 19:30     ` Yoshinori K. Okuji
2005-02-24 22:42       ` Vincent Pelletier
2005-02-25  0:18       ` Hollis Blanchard
2005-02-25  7:14         ` Aki Tossavainen
2005-02-25 11:52           ` [PATCHv2] " Vincent Pelletier
2005-02-25 16:02             ` Hollis Blanchard
2005-02-25 16:13               ` Aki Tossavainen
2005-02-25 16:41                 ` Hollis Blanchard
2005-02-25 17:12               ` Yoshinori K. Okuji
2005-02-25 18:04                 ` Vincent Pelletier
2005-02-25 18:58                   ` Yoshinori K. Okuji
2005-04-14  3:31                 ` Hollis Blanchard
2005-04-14  7:13                   ` Vincent Pelletier
2005-04-14 14:08                     ` Vincent Pelletier
2005-05-09  2:06                       ` Hollis Blanchard
2005-04-14 11:37                   ` Yoshinori K. Okuji

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=421A4CEA.5030603@yahoo.fr \
    --to=subdino2004@yahoo.fr \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.