VirtualBox

Changeset 1364 in vbox for trunk


Ignore:
Timestamp:
Mar 9, 2007 11:56:07 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
19355
Message:

Make the BIOS log prefix a single string instead of replicating it into
every format string. Also fixed printf, which failed horribly if the
argument of a %s contained % characters itself.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/rombios.c

    r1362 r1364  
    964964
    965965#ifdef VBOX
     966static char bios_prefix_string[] = "BIOS: ";
    966967static char bios_cvs_version_string[] = "VirtualBox " VBOX_VERSION_STRING " built " __DATE__ " " __TIME__;
    967968#define BIOS_COPYRIGHT_STRING "InnoTek VirtualBox BIOS"
     
    990991#endif
    991992#ifdef VBOX
    992 #define BX_INFO(format, p...)   bios_printf(BIOS_PRINTF_INFO, "BIOS: " format, ##p)
     993#define BX_INFO(format, p...)   do { put_str(BIOS_PRINTF_INFO, bios_prefix_string); bios_printf(BIOS_PRINTF_INFO, format, ##p); } while (0)
    993994#else /* !VBOX */
    994995#define BX_INFO(format, p...)   bios_printf(BIOS_PRINTF_INFO, format, ##p)
     
    15771578}
    15781579
     1580#ifdef VBOX
     1581void put_str(action, s)
     1582  Bit16u action;
     1583  char *s;
     1584{
     1585  if (!s)
     1586    s = "<NULL>";
     1587  else
     1588    while (*s != 0)
     1589      send(action, *s++);
     1590}
     1591#endif /* VBOX */
     1592
    15791593//--------------------------------------------------------------------------
    15801594// bios_printf()
     
    16461660          }
    16471661        else if (c == 's') {
     1662#ifndef VBOX
    16481663          bios_printf(action & (~BIOS_PRINTF_HALT), arg);
     1664#else /* VBOX */
     1665          put_str(action, arg);
     1666#endif /* VBOX */
    16491667          }
    16501668        else if (c == 'c') {
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette