chiark / gitweb /
basic: add a common syscall wrapper around reboot()
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Feb 2018 16:42:59 +0000 (17:42 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:59:02 +0000 (07:59 +0200)
commit608b07b67bf9f097cec658e15d0adbff5f18985b
tree233f367284f7c41c37bb2f2a2489d096c2582793
parent8053a2643f85274e7f4a3ca2bf1f450756a288f2
basic: add a common syscall wrapper around reboot()

This mimics the raw_clone() call we have in place already and
establishes a new syscall wrapper raw_reboot() that wraps the kernel's
reboot() system call in a bit more low-level fashion that glibc's
reboot() wrapper. The main difference is that the extra "arg" argument
is supported.

Ultimately this just replaces the syscall wrapper implementation we
currently have at three places in our codebase by a single one.

With this change this means that all our syscall() invocations are
neatly separated out in static inline system call wrappers in our header
functions.
src/basic/meson.build
src/basic/raw-reboot.h [new file with mode: 0644]