void dvprintf(const char *debug_context, const char *fmt, va_list args) { const char *debug_env = grub_env_get("debug"); if (debug_env && grub_strword(debug_env, debug_context)) grub_vprintf(fmt, args); }
int vfprintf(FILE *stream, const char *format, va_list args) { grub_errno = GRUB_ERR_NONE; if (stream != stdout && stream != stderr) { grub_printf("Internal error: Python attempted to write to a file.\n"); return -1; } return grub_vprintf(format, args); }
int printf(const char *format, ...) { va_list args; int ret; grub_errno = GRUB_ERR_NONE; va_start(args, format); ret = grub_vprintf(format, args); va_end(args); return ret; }
void grub_fatal (const char *fmt, ...) { va_list ap; va_start (ap, fmt); grub_vprintf (_(fmt), ap); va_end (ap); grub_abort (); }
int grub_err_printf (const char *fmt, ...) { va_list ap; int ret; va_start (ap, fmt); ret = grub_vprintf (fmt, ap); va_end (ap); return ret; }
void 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); va_start (args, fmt); grub_vprintf (fmt, args); va_end (args); } }