Commit Graph

4 Commits

Author SHA1 Message Date
Andreas Kling
94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Andreas Kling
1d0b464618 AK: Make HashMap::get(Key) return an Optional<Value>.
This allows HashMap::get() to be used for value types that cannot be default
constructed (e.g NonnullOwnPtr.)
2019-07-24 10:25:43 +02:00
Conrad Pankoff
d7734bf232 Kernel: Fix KParams parsing with trailing space in kernel cmdline
When there's a trailing space in the cmdline from the boot loader, this
results in an empty string being emitted from `String::split` after
splitting apart the argument list. This empty string resulted in a
zero-length Vector from the subsequent call to split the key=value pairs,
which was unexpected. This ultimately caused a crash when we tried to
access `[0]` of that zero-length vector.

We now detect and handle an empty string coming from `String::split`
correctly.
2019-06-04 07:08:07 -07:00
Conrad Pankoff
738f9de9a9 Kernel: Add KParams class for accessing kernel cmdline parameters (#188) 2019-06-04 03:54:27 -07:00