cmdline.c (747B)
1// SPDX-License-Identifier: GPL-2.0 2#include "misc.h" 3 4static unsigned long fs; 5static inline void set_fs(unsigned long seg) 6{ 7 fs = seg << 4; /* shift it back */ 8} 9typedef unsigned long addr_t; 10static inline char rdfs8(addr_t addr) 11{ 12 return *((char *)(fs + addr)); 13} 14#include "../cmdline.c" 15unsigned long get_cmd_line_ptr(void) 16{ 17 unsigned long cmd_line_ptr = boot_params->hdr.cmd_line_ptr; 18 19 cmd_line_ptr |= (u64)boot_params->ext_cmd_line_ptr << 32; 20 21 return cmd_line_ptr; 22} 23int cmdline_find_option(const char *option, char *buffer, int bufsize) 24{ 25 return __cmdline_find_option(get_cmd_line_ptr(), option, buffer, bufsize); 26} 27int cmdline_find_option_bool(const char *option) 28{ 29 return __cmdline_find_option_bool(get_cmd_line_ptr(), option); 30}