mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 16:41:58 +00:00
bd448d4d0a
CONFIG_EARLY_PRINTK is the only feature that might use command line parsing in the decompression stage. If it is disabled then we can exclude the related code to save space. This can result in an estimated space savings of 2240 bytes from the compressed kernel image. Signed-off-by: Joe Millenbach <jmillenbach@gmail.com> Link: http://lkml.kernel.org/r/1342746282-28497-8-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>
26 lines
580 B
C
26 lines
580 B
C
#include "misc.h"
|
|
|
|
#ifdef CONFIG_EARLY_PRINTK
|
|
|
|
static unsigned long fs;
|
|
static inline void set_fs(unsigned long seg)
|
|
{
|
|
fs = seg << 4; /* shift it back */
|
|
}
|
|
typedef unsigned long addr_t;
|
|
static inline char rdfs8(addr_t addr)
|
|
{
|
|
return *((char *)(fs + addr));
|
|
}
|
|
#include "../cmdline.c"
|
|
int cmdline_find_option(const char *option, char *buffer, int bufsize)
|
|
{
|
|
return __cmdline_find_option(real_mode->hdr.cmd_line_ptr, option, buffer, bufsize);
|
|
}
|
|
int cmdline_find_option_bool(const char *option)
|
|
{
|
|
return __cmdline_find_option_bool(real_mode->hdr.cmd_line_ptr, option);
|
|
}
|
|
|
|
#endif
|