diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-01 23:51:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-01 23:51:12 -0400 |
commit | 16b76293c5c81e6345323d7aef41b26e8390f62d (patch) | |
tree | f2bfdff7e795865c3254cb0ad97ebc66a7c5d212 /kernel | |
parent | 3dee9fb2a4ced89a13a4d4b72b0b7360b701e566 (diff) | |
parent | da63b6b20077469bd6bd96e07991ce145fc4fbc4 (diff) |
Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 boot updates from Ingo Molnar:
"The biggest changes in this cycle were:
- reworking of the e820 code: separate in-kernel and boot-ABI data
structures and apply a whole range of cleanups to the kernel side.
No change in functionality.
- enable KASLR by default: it's used by all major distros and it's
out of the experimental stage as well.
- ... misc fixes and cleanups"
* 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (63 commits)
x86/KASLR: Fix kexec kernel boot crash when KASLR randomization fails
x86/reboot: Turn off KVM when halting a CPU
x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup
x86: Enable KASLR by default
boot/param: Move next_arg() function to lib/cmdline.c for later reuse
x86/boot: Fix Sparse warning by including required header file
x86/boot/64: Rename start_cpu()
x86/xen: Update e820 table handling to the new core x86 E820 code
x86/boot: Fix pr_debug() API braindamage
xen, x86/headers: Add <linux/device.h> dependency to <asm/xen/page.h>
x86/boot/e820: Simplify e820__update_table()
x86/boot/e820: Separate the E820 ABI structures from the in-kernel structures
x86/boot/e820: Fix and clean up e820_type switch() statements
x86/boot/e820: Rename the remaining E820 APIs to the e820__*() prefix
x86/boot/e820: Remove unnecessary #include's
x86/boot/e820: Rename e820_mark_nosave_regions() to e820__register_nosave_regions()
x86/boot/e820: Rename e820_reserve_resources*() to e820__reserve_resources*()
x86/boot/e820: Use bool in query APIs
x86/boot/e820: Document e820__reserve_setup_data()
x86/boot/e820: Clean up __e820__update_table() et al
...
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/params.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/kernel/params.c b/kernel/params.c index a6d6149c0fe6..60b2d8101355 100644 --- a/kernel/params.c +++ b/kernel/params.c | |||
@@ -160,58 +160,6 @@ static int parse_one(char *param, | |||
160 | return -ENOENT; | 160 | return -ENOENT; |
161 | } | 161 | } |
162 | 162 | ||
163 | /* You can use " around spaces, but can't escape ". */ | ||
164 | /* Hyphens and underscores equivalent in parameter names. */ | ||
165 | static char *next_arg(char *args, char **param, char **val) | ||
166 | { | ||
167 | unsigned int i, equals = 0; | ||
168 | int in_quote = 0, quoted = 0; | ||
169 | char *next; | ||
170 | |||
171 | if (*args == '"') { | ||
172 | args++; | ||
173 | in_quote = 1; | ||
174 | quoted = 1; | ||
175 | } | ||
176 | |||
177 | for (i = 0; args[i]; i++) { | ||
178 | if (isspace(args[i]) && !in_quote) | ||
179 | break; | ||
180 | if (equals == 0) { | ||
181 | if (args[i] == '=') | ||
182 | equals = i; | ||
183 | } | ||
184 | if (args[i] == '"') | ||
185 | in_quote = !in_quote; | ||
186 | } | ||
187 | |||
188 | *param = args; | ||
189 | if (!equals) | ||
190 | *val = NULL; | ||
191 | else { | ||
192 | args[equals] = '\0'; | ||
193 | *val = args + equals + 1; | ||
194 | |||
195 | /* Don't include quotes in value. */ | ||
196 | if (**val == '"') { | ||
197 | (*val)++; | ||
198 | if (args[i-1] == '"') | ||
199 | args[i-1] = '\0'; | ||
200 | } | ||
201 | } | ||
202 | if (quoted && args[i-1] == '"') | ||
203 | args[i-1] = '\0'; | ||
204 | |||
205 | if (args[i]) { | ||
206 | args[i] = '\0'; | ||
207 | next = args + i + 1; | ||
208 | } else | ||
209 | next = args + i; | ||
210 | |||
211 | /* Chew up trailing spaces. */ | ||
212 | return skip_spaces(next); | ||
213 | } | ||
214 | |||
215 | /* Args looks like "foo=bar,bar2 baz=fuz wiz". */ | 163 | /* Args looks like "foo=bar,bar2 baz=fuz wiz". */ |
216 | char *parse_args(const char *doing, | 164 | char *parse_args(const char *doing, |
217 | char *args, | 165 | char *args, |