Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 #include "misc.h"
0003 
0004 static unsigned long fs;
0005 static inline void set_fs(unsigned long seg)
0006 {
0007     fs = seg << 4;  /* shift it back */
0008 }
0009 typedef unsigned long addr_t;
0010 static inline char rdfs8(addr_t addr)
0011 {
0012     return *((char *)(fs + addr));
0013 }
0014 #include "../cmdline.c"
0015 unsigned long get_cmd_line_ptr(void)
0016 {
0017     unsigned long cmd_line_ptr = boot_params->hdr.cmd_line_ptr;
0018 
0019     cmd_line_ptr |= (u64)boot_params->ext_cmd_line_ptr << 32;
0020 
0021     return cmd_line_ptr;
0022 }
0023 int cmdline_find_option(const char *option, char *buffer, int bufsize)
0024 {
0025     return __cmdline_find_option(get_cmd_line_ptr(), option, buffer, bufsize);
0026 }
0027 int cmdline_find_option_bool(const char *option)
0028 {
0029     return __cmdline_find_option_bool(get_cmd_line_ptr(), option);
0030 }