示例#1
0
int GUI_printf(const char * fmt, ...)
{
    va_list ap;
	va_start(ap, fmt);
	if (bootArgs->Video.v_display == VGA_TEXT_MODE)
	{
		prf(fmt, ap, putchar, 0);
	}
	else
	{
		vprf(fmt, ap);
	}
	
	/* Kabyl: BooterLog */
	struct putc_info pi;
	
	if (!msgbuf)
		return 0;
	
	if (((cursor - msgbuf) > (BOOTER_LOG_SIZE - SAFE_LOG_SIZE)))
		return 0;
	pi.str = cursor;
	pi.last_str = 0;
	prf(fmt, ap, sputc, &pi);
	cursor +=  strlen((char *)cursor);
	
	va_end(ap);
    return 0;
}
示例#2
0
int verbose(const char * fmt, ...)
{
    va_list ap;

	va_start(ap, fmt);
    if (gVerboseMode)
    {
		if (bootArgs->Video.v_display == VGA_TEXT_MODE)
			prf(fmt, ap, putchar, 0);
		else
			vprf(fmt, ap);
    }

	{
		// Kabyl: BooterLog
		struct putc_info pi;

		if (!msgbuf)
			return 0;

		if (((cursor - msgbuf) > (BOOTER_LOG_SIZE - SAFE_LOG_SIZE)))
			return 0;
		pi.str = cursor;
		pi.last_str = 0;
		prf(fmt, ap, sputc, &pi);
		cursor +=  strlen((char *)cursor);
	}

    va_end(ap);
    return(0);
}
示例#3
0
int error(const char * fmt, ...)
{
	va_list ap;
	gErrors = true;
	va_start(ap, fmt);
	if (bootArgs->Video.v_display == VGA_TEXT_MODE) {
		prf(fmt, ap, putchar, 0);
	} else {
		vprf(fmt, ap);
	}
    
    {
        // Kabyl: BooterLog
        struct putc_info pi;
        
        if (!msgbuf) {
            return 0;
        }
        
        if (((cursor - msgbuf) > (BOOTER_LOG_SIZE - SAFE_LOG_SIZE))) {
            return 0;
        }
        
        pi.str = cursor;
        pi.last_str = 0;
        prf(fmt, ap, sputc, &pi);
        cursor +=  strlen((char *)cursor);
    }
    
	va_end(ap);
	return(0);
}
示例#4
0
int error(const char * fmt, ...)
{
    va_list ap;
    gErrors = true;
    va_start(ap, fmt);
	if (bootArgs->Video.v_display == VGA_TEXT_MODE)
		prf(fmt, ap, putchar, 0);
    else
		vprf(fmt, ap);
	va_end(ap);
    return(0);
}
示例#5
0
void stop(const char * fmt, ...)
{
	va_list ap;

	printf("\n");
	va_start(ap, fmt);
	if (bootArgs->Video.v_display == VGA_TEXT_MODE) {
		prf(fmt, ap, putchar, 0);
	} else {
		vprf(fmt, ap);
	}
	va_end(ap);
	printf("\nThis is a non recoverable error! System HALTED!!!");
	halt();
	while (1);
}