cmdline.c (96916090f488986a4ebb8e9ffa6a3b50881d5ccd) | cmdline.c (f4ed2877b16e8146427306aea8819adac5c88374) |
---|---|
1/* -*- linux-c -*- ------------------------------------------------------- * 2 * 3 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright 2007 rPath, Inc. - All Rights Reserved 5 * 6 * This file is part of the Linux kernel, and is made available under 7 * the terms of the GNU General Public License version 2. 8 * --- 13 unchanged lines hidden (view full) --- 22/* 23 * Find a non-boolean option, that is, "option=argument". In accordance 24 * with standard Linux practice, if this option is repeated, this returns 25 * the last instance on the command line. 26 * 27 * Returns the length of the argument (regardless of if it was 28 * truncated to fit in the buffer), or -1 on not found. 29 */ | 1/* -*- linux-c -*- ------------------------------------------------------- * 2 * 3 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright 2007 rPath, Inc. - All Rights Reserved 5 * 6 * This file is part of the Linux kernel, and is made available under 7 * the terms of the GNU General Public License version 2. 8 * --- 13 unchanged lines hidden (view full) --- 22/* 23 * Find a non-boolean option, that is, "option=argument". In accordance 24 * with standard Linux practice, if this option is repeated, this returns 25 * the last instance on the command line. 26 * 27 * Returns the length of the argument (regardless of if it was 28 * truncated to fit in the buffer), or -1 on not found. 29 */ |
30int cmdline_find_option(const char *option, char *buffer, int bufsize) | 30int __cmdline_find_option(u32 cmdline_ptr, const char *option, char *buffer, int bufsize) |
31{ | 31{ |
32 u32 cmdline_ptr = boot_params.hdr.cmd_line_ptr; | |
33 addr_t cptr; 34 char c; 35 int len = -1; 36 const char *opptr = NULL; 37 char *bufptr = buffer; 38 enum { 39 st_wordstart, /* Start of word/after whitespace */ 40 st_wordcmp, /* Comparing this word */ --- 54 unchanged lines hidden (view full) --- 95} 96 97/* 98 * Find a boolean option (like quiet,noapic,nosmp....) 99 * 100 * Returns the position of that option (starts counting with 1) 101 * or 0 on not found 102 */ | 32 addr_t cptr; 33 char c; 34 int len = -1; 35 const char *opptr = NULL; 36 char *bufptr = buffer; 37 enum { 38 st_wordstart, /* Start of word/after whitespace */ 39 st_wordcmp, /* Comparing this word */ --- 54 unchanged lines hidden (view full) --- 94} 95 96/* 97 * Find a boolean option (like quiet,noapic,nosmp....) 98 * 99 * Returns the position of that option (starts counting with 1) 100 * or 0 on not found 101 */ |
103int cmdline_find_option_bool(const char *option) | 102int __cmdline_find_option_bool(u32 cmdline_ptr, const char *option) |
104{ | 103{ |
105 u32 cmdline_ptr = boot_params.hdr.cmd_line_ptr; | |
106 addr_t cptr; 107 char c; 108 int pos = 0, wstart = 0; 109 const char *opptr = NULL; 110 enum { 111 st_wordstart, /* Start of word/after whitespace */ 112 st_wordcmp, /* Comparing this word */ 113 st_wordskip, /* Miscompare, skip */ --- 47 unchanged lines hidden --- | 104 addr_t cptr; 105 char c; 106 int pos = 0, wstart = 0; 107 const char *opptr = NULL; 108 enum { 109 st_wordstart, /* Start of word/after whitespace */ 110 st_wordcmp, /* Comparing this word */ 111 st_wordskip, /* Miscompare, skip */ --- 47 unchanged lines hidden --- |