mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
x86, boot: Switch output functions from command-line flags to conditional compilation
Changed putstr flagging from parameter to conditional compilation for puts, debug_putstr, and error_putstr. This allows for space savings since most configurations won't use this feature. Signed-off-by: Joe Millenbach <jmillenbach@gmail.com> Link: http://lkml.kernel.org/r/1342746282-28497-5-git-send-email-jmillenbach@gmail.com Signed-off-by: Gokul Caushik <caushik1@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
cb454fe104
commit
7aac3015b5
2 changed files with 14 additions and 15 deletions
|
@ -169,15 +169,11 @@ static void serial_putchar(int ch)
|
||||||
outb(ch, early_serial_base + TXR);
|
outb(ch, early_serial_base + TXR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __putstr(int error, const char *s)
|
void __putstr(const char *s)
|
||||||
{
|
{
|
||||||
int x, y, pos;
|
int x, y, pos;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
#ifndef CONFIG_X86_VERBOSE_BOOTUP
|
|
||||||
if (!error)
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
if (early_serial_base) {
|
if (early_serial_base) {
|
||||||
const char *str = s;
|
const char *str = s;
|
||||||
while (*str) {
|
while (*str) {
|
||||||
|
@ -223,12 +219,6 @@ void __putstr(int error, const char *s)
|
||||||
outb(0xff & (pos >> 1), vidport+1);
|
outb(0xff & (pos >> 1), vidport+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void debug_putstr(const char *s)
|
|
||||||
{
|
|
||||||
if (debug)
|
|
||||||
putstr(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *memset(void *s, int c, size_t n)
|
void *memset(void *s, int c, size_t n)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -24,10 +24,19 @@
|
||||||
|
|
||||||
/* misc.c */
|
/* misc.c */
|
||||||
extern struct boot_params *real_mode; /* Pointer to real-mode data */
|
extern struct boot_params *real_mode; /* Pointer to real-mode data */
|
||||||
void __putstr(int error, const char *s);
|
void __putstr(const char *s);
|
||||||
#define putstr(__x) __putstr(0, __x)
|
#define error_putstr(__x) __putstr(__x)
|
||||||
#define error_putstr(__x) __putstr(1, __x)
|
|
||||||
#define puts(__x) __putstr(0, __x)
|
#ifdef CONFIG_X86_VERBOSE_BOOTUP
|
||||||
|
|
||||||
|
#define debug_putstr(__x) __putstr(__x)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
static inline void debug_putstr(const char *s)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* cmdline.c */
|
/* cmdline.c */
|
||||||
int cmdline_find_option(const char *option, char *buffer, int bufsize);
|
int cmdline_find_option(const char *option, char *buffer, int bufsize);
|
||||||
|
|
Loading…
Add table
Reference in a new issue