]> git.proxmox.com Git - grub2.git/blobdiff - kern/misc.c
2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
[grub2.git] / kern / misc.c
index fc61343c8cace9b3eb908f1b6f5731df97ceae9c..b91bd0a0811db9205fab7b54943005eb09c73b06 100644 (file)
@@ -129,16 +129,18 @@ grub_printf (const char *fmt, ...)
 }  
 
 void
-grub_real_dprintf(const char *file, const int line, const char *condition,
-                  const char *fmt, ...)
+grub_real_dprintf (const char *file, const int line, const char *condition,
+                  const char *fmt, ...)
 {
   va_list args;
   const char *debug = grub_env_get ("debug");
+  
   if (! debug)
     return;
+  
   if (grub_strword (debug, "all") || grub_strword (debug, condition))
     {
-      grub_printf ("%s,%d : ", file, line);
+      grub_printf ("%s:%d: ", file, line);
       va_start (args, fmt);
       grub_vprintf (fmt, args);
       va_end (args);
@@ -955,3 +957,16 @@ grub_utf8_to_ucs4 (grub_uint32_t *dest, const grub_uint8_t *src,
 
   return p - dest;
 }
+
+/* Abort GRUB. This function does not return.  */
+void
+grub_abort (void)
+{
+  if (grub_term_get_current ())
+    {
+      grub_printf ("Abort. Press any key to exit.");
+      grub_getkey ();
+    }
+  
+  grub_exit ();
+}