Commit graph

5 commits

Author SHA1 Message Date
Warner Losh
649cc35981 kboot: Create function for error checking.
Linux has the convention of returning -ERRNO to flag errors from its
system calls. Sometimes other negative values are returned that are
success...  However, only values -1 to -4096 (inclusive) are really
errors. The rest are either truncated values that only look negative (so
use long instead of int), or are things like addresses or legal unsigned
file offsets or similar that are successful returns. Filter out the
latter.

Sponsored by:		Netflix

(cherry picked from commit 3ae18fdfbcaad827defdc217386e73c993beeba0)
2024-04-16 13:54:29 -06:00
Warner Losh
a975ee493d kboot: update copyright on these files.
host_syscalls.c: I've written, so put Netflix copyright on. It's
possible in the confusion that Nathan wrote the host_gettimeofday
implementation.

syscall_nr: These files likely can't enjoy copyright protection since
they are just facts (the per-arch Linux system calls), so add a note
they are in the public domain.

Sponsored by:		Netflix

(cherry picked from commit 8f7327dceecc225029b17378e4a26ae0b73a0a49)
2024-04-16 13:54:21 -06:00
Warner Losh
b5fa90e2e2 kboot: Assert copyright here
According to git blame I've 95%+ rewritten this file. Update copyright to
reflect that, but give nod to Nathan for the original I started with.

Sponsored by:		Netflix

(cherry picked from commit 2b7918f13c6fce378a75f8247b5dd203bf4a3c5d)
2024-04-16 13:54:21 -06:00
Warner Losh
df6ae11400 kboot: Move termios to libkboot
Sponsored by:		Netflix

(cherry picked from commit 36ef238cb604c827c696e975281f63d90641005f)
2024-04-16 13:54:21 -06:00
Warner Losh
29f9f6b980 kboot: Move system calls to libkboot
Sponsored by:		Netflix

(cherry picked from commit 2e3f49888ec8851bafb22011533217487764fdb0)
2024-04-16 13:54:21 -06:00