Compare commits
46 Commits
08bad0e66e
...
bcbebcc435
Author | SHA1 | Date |
---|---|---|
![]() |
bcbebcc435 | |
![]() |
edc49209f1 | |
![]() |
2791b2bc3d | |
![]() |
7baf24c949 | |
![]() |
ce921df8d1 | |
![]() |
c96a5d9912 | |
![]() |
6858c1fd8b | |
![]() |
b1236ce38b | |
![]() |
73f3600970 | |
![]() |
bf5db803e7 | |
![]() |
cba44a1975 | |
![]() |
96334a84f2 | |
![]() |
e809b6a7e9 | |
![]() |
e0208363e5 | |
![]() |
790a4ee5cf | |
![]() |
63f420dedc | |
![]() |
78b6501311 | |
![]() |
92e8293413 | |
![]() |
b8e799caa8 | |
![]() |
50261211d6 | |
![]() |
710653d3bc | |
![]() |
d9826d303b | |
![]() |
10ed8cda58 | |
![]() |
52278e0634 | |
![]() |
4cf443e644 | |
![]() |
a85f73fa55 | |
![]() |
09ddaf2af3 | |
![]() |
919aeb666a | |
![]() |
1b25b88f82 | |
![]() |
5c6e6f5ad1 | |
![]() |
10d786458c | |
![]() |
d3af116afd | |
![]() |
32b5deb1b2 | |
![]() |
6d1a69d0f0 | |
![]() |
25a9bd72ef | |
![]() |
4100e0f207 | |
![]() |
765ffa12ee | |
![]() |
5f43554f90 | |
![]() |
70669fa2fe | |
![]() |
f92fac7e9b | |
![]() |
855800aaec | |
![]() |
f8b0277101 | |
![]() |
9ee08c8dce | |
![]() |
19aa8c0f0e | |
![]() |
3e8a4defa8 | |
![]() |
76a8f5ae4b |
|
@ -25,7 +25,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
- uses: systemd/mkosi@7e4ec15aee6b98300b2ee14265bc647a716a9f8a
|
- uses: systemd/mkosi@dbb4020beee2cdf250f93a425794f1cf8b0fe693
|
||||||
|
|
||||||
# Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space
|
# Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space
|
||||||
# immediately, we remove the files in the background. However, we first move them to a different location
|
# immediately, we remove the files in the background. However, we first move them to a different location
|
||||||
|
@ -90,7 +90,6 @@ jobs:
|
||||||
sudo mkosi sandbox -- \
|
sudo mkosi sandbox -- \
|
||||||
meson setup \
|
meson setup \
|
||||||
--buildtype=debugoptimized \
|
--buildtype=debugoptimized \
|
||||||
-Dintegration-tests=true \
|
|
||||||
build
|
build
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
|
@ -120,7 +119,8 @@ jobs:
|
||||||
meson test \
|
meson test \
|
||||||
-C build \
|
-C build \
|
||||||
--no-rebuild \
|
--no-rebuild \
|
||||||
--suite integration-tests \
|
--setup=integration \
|
||||||
|
--suite=integration-tests \
|
||||||
--print-errorlogs \
|
--print-errorlogs \
|
||||||
--no-stdsplit \
|
--no-stdsplit \
|
||||||
--num-processes "$(($(nproc) - 1))" \
|
--num-processes "$(($(nproc) - 1))" \
|
||||||
|
|
|
@ -120,7 +120,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
- uses: systemd/mkosi@7e4ec15aee6b98300b2ee14265bc647a716a9f8a
|
- uses: systemd/mkosi@dbb4020beee2cdf250f93a425794f1cf8b0fe693
|
||||||
|
|
||||||
# Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space
|
# Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space
|
||||||
# immediately, we remove the files in the background. However, we first move them to a different location
|
# immediately, we remove the files in the background. However, we first move them to a different location
|
||||||
|
@ -197,7 +197,6 @@ jobs:
|
||||||
sudo mkosi sandbox -- \
|
sudo mkosi sandbox -- \
|
||||||
meson setup \
|
meson setup \
|
||||||
--buildtype=debugoptimized \
|
--buildtype=debugoptimized \
|
||||||
-Dintegration-tests=true \
|
|
||||||
-Dbpf-framework=disabled \
|
-Dbpf-framework=disabled \
|
||||||
build
|
build
|
||||||
|
|
||||||
|
@ -233,7 +232,8 @@ jobs:
|
||||||
meson test \
|
meson test \
|
||||||
-C build \
|
-C build \
|
||||||
--no-rebuild \
|
--no-rebuild \
|
||||||
--suite integration-tests \
|
--setup=integration \
|
||||||
|
--suite=integration-tests \
|
||||||
--print-errorlogs \
|
--print-errorlogs \
|
||||||
--no-stdsplit \
|
--no-stdsplit \
|
||||||
--num-processes "$(($(nproc) - 1))" \
|
--num-processes "$(($(nproc) - 1))" \
|
||||||
|
|
|
@ -32,23 +32,23 @@ The following exceptions apply:
|
||||||
* some sources under src/udev/ are licensed under **GPL-2.0-or-later**,
|
* some sources under src/udev/ are licensed under **GPL-2.0-or-later**,
|
||||||
so all udev programs (`systemd-udevd`, `udevadm`, and the udev builtins
|
so all udev programs (`systemd-udevd`, `udevadm`, and the udev builtins
|
||||||
and test programs) are also distributed under **GPL-2.0-or-later**.
|
and test programs) are also distributed under **GPL-2.0-or-later**.
|
||||||
* the header files contained in src/basic/linux/ and src/shared/linux/ are copied
|
* the header files contained in src/basic/linux/linux are copied
|
||||||
verbatim from the Linux kernel source tree and are licensed under **GPL-2.0 WITH
|
verbatim from the Linux kernel source tree and are licensed under **GPL-2.0 WITH
|
||||||
Linux-syscall-note** and are used within the scope of the Linux-syscall-note
|
Linux-syscall-note** and are used within the scope of the Linux-syscall-note
|
||||||
exception provisions
|
exception provisions
|
||||||
* the following sources are licensed under the **LGPL-2.0-or-later** license:
|
* the following sources are licensed under the **LGPL-2.0-or-later** license:
|
||||||
- src/basic/utf8.c
|
- src/basic/utf8.c
|
||||||
- src/shared/initreq.h
|
- src/shared/initreq.h
|
||||||
* the src/shared/linux/bpf_insn.h header is copied from the Linux kernel
|
* the src/basic/linux/bpf_insn.h header is copied from the Linux kernel
|
||||||
source tree and is licensed under either **BSD-2-Clause** or **GPL-2.0-only**,
|
source tree and is licensed under either **BSD-2-Clause** or **GPL-2.0-only**,
|
||||||
and thus is included in the systemd build under the BSD-2-Clause license.
|
and thus is included in the systemd build under the BSD-2-Clause license.
|
||||||
* The src/basic/linux/wireguard.h header is copied from the Linux kernel
|
* The src/basic/linux/linux/wireguard.h header is copied from the Linux kernel
|
||||||
source tree and is licensed under either **MIT** or **GPL-2.0 WITH Linux-syscall-note**,
|
source tree and is licensed under either **MIT** or **GPL-2.0 WITH Linux-syscall-note**,
|
||||||
and thus is included in the systemd build under the MIT license.
|
and thus is included in the systemd build under the MIT license.
|
||||||
* the following sources are licensed under the **MIT** license (in case of our
|
* the following sources are licensed under the **MIT** license (in case of our
|
||||||
scripts, to facilitate copying and reuse of those helpers to other projects):
|
scripts, to facilitate copying and reuse of those helpers to other projects):
|
||||||
- hwdb.d/parse_hwdb.py
|
- hwdb.d/parse_hwdb.py
|
||||||
- src/basic/linux/batman_adv.h
|
- src/basic/linux/linux/batman_adv.h
|
||||||
- src/basic/sparse-endian.h
|
- src/basic/sparse-endian.h
|
||||||
- tools/catalog-report.py
|
- tools/catalog-report.py
|
||||||
* the following sources are licensed under the **CC0-1.0** license:
|
* the following sources are licensed under the **CC0-1.0** license:
|
||||||
|
|
|
@ -5,7 +5,6 @@ set -e
|
||||||
# Exclude following paths from the Coccinelle transformations
|
# Exclude following paths from the Coccinelle transformations
|
||||||
EXCLUDED_PATHS=(
|
EXCLUDED_PATHS=(
|
||||||
"src/boot/efi/*"
|
"src/boot/efi/*"
|
||||||
"src/shared/linux/*"
|
|
||||||
"src/basic/linux/*"
|
"src/basic/linux/*"
|
||||||
# Symlinked to test-bus-vtable-cc.cc, which causes issues with the IN_SET macro
|
# Symlinked to test-bus-vtable-cc.cc, which causes issues with the IN_SET macro
|
||||||
"src/libsystemd/sd-bus/test-bus-vtable.c"
|
"src/libsystemd/sd-bus/test-bus-vtable.c"
|
||||||
|
|
22
meson.build
22
meson.build
|
@ -13,6 +13,12 @@ project('systemd', 'c',
|
||||||
meson_version : '>= 0.62.0',
|
meson_version : '>= 0.62.0',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_test_setup(
|
||||||
|
'default',
|
||||||
|
exclude_suites : ['integration-tests'],
|
||||||
|
is_default : true,
|
||||||
|
)
|
||||||
|
|
||||||
project_major_version = meson.project_version().split('.')[0].split('~')[0]
|
project_major_version = meson.project_version().split('.')[0].split('~')[0]
|
||||||
if meson.project_version().contains('.')
|
if meson.project_version().contains('.')
|
||||||
project_minor_version = meson.project_version().split('.')[-1].split('~')[0]
|
project_minor_version = meson.project_version().split('.')[-1].split('~')[0]
|
||||||
|
@ -339,7 +345,6 @@ meson_build_sh = find_program('tools/meson-build.sh')
|
||||||
want_tests = get_option('tests')
|
want_tests = get_option('tests')
|
||||||
want_slow_tests = want_tests != 'false' and get_option('slow-tests')
|
want_slow_tests = want_tests != 'false' and get_option('slow-tests')
|
||||||
want_fuzz_tests = want_tests != 'false' and get_option('fuzz-tests')
|
want_fuzz_tests = want_tests != 'false' and get_option('fuzz-tests')
|
||||||
want_integration_tests = want_tests != 'false' and get_option('integration-tests')
|
|
||||||
install_tests = want_tests != 'false' and get_option('install-tests')
|
install_tests = want_tests != 'false' and get_option('install-tests')
|
||||||
|
|
||||||
if add_languages('cpp', native : false, required : fuzzer_build)
|
if add_languages('cpp', native : false, required : fuzzer_build)
|
||||||
|
@ -2048,11 +2053,18 @@ boot_stubs = []
|
||||||
|
|
||||||
build_dir_include = include_directories('.')
|
build_dir_include = include_directories('.')
|
||||||
|
|
||||||
basic_includes = include_directories(
|
basic_includes = [
|
||||||
|
include_directories(
|
||||||
'src/basic',
|
'src/basic',
|
||||||
'src/fundamental',
|
'src/fundamental',
|
||||||
'src/systemd',
|
'src/systemd',
|
||||||
'.')
|
'.',
|
||||||
|
),
|
||||||
|
include_directories(
|
||||||
|
'src/basic/linux',
|
||||||
|
is_system : true
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
||||||
libsystemd_includes = [basic_includes, include_directories(
|
libsystemd_includes = [basic_includes, include_directories(
|
||||||
'src/libsystemd/sd-bus',
|
'src/libsystemd/sd-bus',
|
||||||
|
@ -2661,10 +2673,6 @@ endif
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
mkosi = find_program('mkosi', required : false)
|
mkosi = find_program('mkosi', required : false)
|
||||||
if want_integration_tests and not mkosi.found()
|
|
||||||
error('Could not find mkosi which is required to run the integration tests')
|
|
||||||
endif
|
|
||||||
|
|
||||||
mkosi_depends = public_programs
|
mkosi_depends = public_programs
|
||||||
|
|
||||||
foreach executable : ['systemd-journal-remote', 'systemd-sbsign', 'systemd-keyutil']
|
foreach executable : ['systemd-journal-remote', 'systemd-sbsign', 'systemd-keyutil']
|
||||||
|
|
|
@ -509,7 +509,7 @@ option('install-tests', type : 'boolean', value : false,
|
||||||
description : 'install test executables')
|
description : 'install test executables')
|
||||||
option('log-message-verification', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
option('log-message-verification', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'do fake printf() calls to verify format strings')
|
description : 'do fake printf() calls to verify format strings')
|
||||||
option('integration-tests', type : 'boolean', value : false,
|
option('integration-tests', type : 'boolean', value : false, deprecated : true,
|
||||||
description : 'run the integration tests')
|
description : 'run the integration tests')
|
||||||
|
|
||||||
option('ok-color', type : 'combo',
|
option('ok-color', type : 'combo',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
[Config]
|
[Config]
|
||||||
MinimumVersion=commit:7e4ec15aee6b98300b2ee14265bc647a716a9f8a
|
MinimumVersion=commit:dbb4020beee2cdf250f93a425794f1cf8b0fe693
|
||||||
Dependencies=
|
Dependencies=
|
||||||
exitrd
|
exitrd
|
||||||
initrd
|
initrd
|
||||||
|
@ -78,8 +78,7 @@ KernelCommandLine=
|
||||||
oops=panic
|
oops=panic
|
||||||
panic=-1
|
panic=-1
|
||||||
softlockup_panic=1
|
softlockup_panic=1
|
||||||
# Disabled due to BTRFS issue, waiting for the fix to become available
|
panic_on_warn=1
|
||||||
panic_on_warn=0
|
|
||||||
psi=1
|
psi=1
|
||||||
mitigations=off
|
mitigations=off
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,20 @@ ENV{DDC_DEVICE}=="?*", TAG+="uaccess"
|
||||||
# media player raw devices (for user-mode drivers, Android SDK, etc.)
|
# media player raw devices (for user-mode drivers, Android SDK, etc.)
|
||||||
SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess"
|
SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess"
|
||||||
|
|
||||||
|
# Android devices (ADB DbC, ADB, Fastboot)
|
||||||
|
# Used to interact with devices over Android Debug Bridge and Fastboot protocols, see:
|
||||||
|
# * https://developer.android.com/tools/adb
|
||||||
|
# * https://source.android.com/docs/setup/test/running
|
||||||
|
# * https://source.android.com/docs/setup/test/flash
|
||||||
|
#
|
||||||
|
# The bInterfaceClass and bInterfaceSubClass used are documented in source code here:
|
||||||
|
# * https://android.googlesource.com/platform/packages/modules/adb/+/d0db47dcdf941673f405e1095e6ffb5e565902e5/adb.h#199
|
||||||
|
# * https://android.googlesource.com/platform/system/core/+/7199051aaf0ddfa2849650933119307327d8669c/fastboot/fastboot.cpp#244
|
||||||
|
#
|
||||||
|
# Since it's using a generic vendor specific interface class, this can potentially result
|
||||||
|
# in a rare case where non-ADB/Fastboot device ends up with an ID_DEBUG_APPLIANCE="android".
|
||||||
|
SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:dc0201:*|*:ff4201:*|*:ff4203:*", ENV{ID_DEBUG_APPLIANCE}="android"
|
||||||
|
|
||||||
# software-defined radio communication devices
|
# software-defined radio communication devices
|
||||||
ENV{ID_SOFTWARE_RADIO}=="?*", TAG+="uaccess"
|
ENV{ID_SOFTWARE_RADIO}=="?*", TAG+="uaccess"
|
||||||
|
|
||||||
|
@ -111,4 +125,7 @@ SUBSYSTEM=="hidraw", ENV{ID_HARDWARE_WALLET}=="1", TAG+="uaccess"
|
||||||
# As defined in https://en.wikipedia.org/wiki/3Dconnexion
|
# As defined in https://en.wikipedia.org/wiki/3Dconnexion
|
||||||
SUBSYSTEM=="hidraw", ENV{ID_INPUT_3D_MOUSE}=="1", TAG+="uaccess"
|
SUBSYSTEM=="hidraw", ENV{ID_INPUT_3D_MOUSE}=="1", TAG+="uaccess"
|
||||||
|
|
||||||
|
# Debug interfaces (e.g. Android Debug Bridge)
|
||||||
|
ENV{ID_DEBUG_APPLIANCE}=="?*", TAG+="uaccess"
|
||||||
|
|
||||||
LABEL="uaccess_end"
|
LABEL="uaccess_end"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "ansi-color.h"
|
#include "ansi-color.h"
|
||||||
#include "battery-util.h"
|
#include "battery-util.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
|
#include "log.h"
|
||||||
#include "main-func.h"
|
#include "main-func.h"
|
||||||
#include "pretty-print.h"
|
#include "pretty-print.h"
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "analyze-compare-versions.h"
|
#include "analyze-compare-versions.h"
|
||||||
#include "compare-operator.h"
|
#include "compare-operator.h"
|
||||||
|
#include "log.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
#include "strv.h"
|
#include "strv.h"
|
||||||
|
|
|
@ -31,7 +31,7 @@ static void log_syntax_callback(const char *unit, int level, void *userdata) {
|
||||||
|
|
||||||
r = set_put_strdup(s, unit);
|
r = set_put_strdup(s, unit);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
set_free_free(*s);
|
set_free(*s);
|
||||||
*s = POINTER_MAX;
|
*s = POINTER_MAX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,7 @@ static int verify_unit(Unit *u, bool check_man, const char *root) {
|
||||||
static void set_destroy_ignore_pointer_max(Set **s) {
|
static void set_destroy_ignore_pointer_max(Set **s) {
|
||||||
if (*s == POINTER_MAX)
|
if (*s == POINTER_MAX)
|
||||||
return;
|
return;
|
||||||
set_free_free(*s);
|
set_free(*s);
|
||||||
}
|
}
|
||||||
|
|
||||||
int verify_units(
|
int verify_units(
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "memory-util.h"
|
|
||||||
|
|
||||||
void* memdup(const void *p, size_t l) {
|
void* memdup(const void *p, size_t l) {
|
||||||
void *ret;
|
void *ret;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
|
#include "memory-util.h"
|
||||||
|
|
||||||
#if HAS_FEATURE_MEMORY_SANITIZER
|
#if HAS_FEATURE_MEMORY_SANITIZER
|
||||||
# include <sanitizer/msan_interface.h>
|
# include <sanitizer/msan_interface.h>
|
||||||
|
@ -266,5 +267,3 @@ _alloc_(2) static inline void *realloc0(void *p, size_t new_size) {
|
||||||
|
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "memory-util.h"
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "argv-util.h"
|
#include "argv-util.h"
|
||||||
#include "capability-util.h"
|
#include "capability-util.h"
|
||||||
#include "errno-util.h"
|
#include "errno-util.h"
|
||||||
|
#include "log.h"
|
||||||
#include "missing_sched.h"
|
#include "missing_sched.h"
|
||||||
#include "parse-util.h"
|
#include "parse-util.h"
|
||||||
#include "path-util.h"
|
#include "path-util.h"
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "ansi-color.h"
|
#include "ansi-color.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "extract-word.h"
|
#include "extract-word.h"
|
||||||
|
#include "log.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
#include "terminal-util.h"
|
#include "terminal-util.h"
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "capability-util.h"
|
#include "capability-util.h"
|
||||||
#include "cap-list.h"
|
#include "cap-list.h"
|
||||||
#include "extract-word.h"
|
#include "extract-word.h"
|
||||||
|
#include "log.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "parse-util.h"
|
#include "parse-util.h"
|
||||||
#include "stdio-util.h"
|
#include "stdio-util.h"
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "parse-util.h"
|
#include "parse-util.h"
|
||||||
#include "pidref.h"
|
#include "pidref.h"
|
||||||
|
#include "process-util.h"
|
||||||
#include "stat-util.h"
|
#include "stat-util.h"
|
||||||
#include "user-util.h"
|
#include "user-util.h"
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "errno-util.h"
|
#include "errno-util.h"
|
||||||
#include "fd-util.h"
|
#include "fd-util.h"
|
||||||
#include "fs-util.h"
|
#include "fs-util.h"
|
||||||
|
#include "log.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "fd-util.h"
|
#include "fd-util.h"
|
||||||
#include "fileio.h"
|
#include "fileio.h"
|
||||||
#include "io-util.h"
|
#include "io-util.h"
|
||||||
|
#include "log.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "sparse-endian.h"
|
#include "sparse-endian.h"
|
||||||
#include "string-table.h"
|
#include "string-table.h"
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "errno-util.h"
|
#include "errno-util.h"
|
||||||
#include "fd-util.h"
|
#include "fd-util.h"
|
||||||
#include "fileio.h"
|
#include "fileio.h"
|
||||||
|
#include "log.h"
|
||||||
#include "string-table.h"
|
#include "string-table.h"
|
||||||
#include "utf8.h"
|
#include "utf8.h"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||||
|
|
||||||
#include "dlfcn-util.h"
|
#include "dlfcn-util.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
static int dlsym_many_or_warnv(void *dl, int log_level, va_list ap) {
|
static int dlsym_many_or_warnv(void *dl, int log_level, va_list ap) {
|
||||||
void (**fn)(void);
|
void (**fn)(void);
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "fd-util.h"
|
#include "fd-util.h"
|
||||||
#include "fileio.h"
|
#include "fileio.h"
|
||||||
#include "io-util.h"
|
#include "io-util.h"
|
||||||
|
#include "log.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "memory-util.h"
|
#include "memory-util.h"
|
||||||
#include "missing_fs.h"
|
#include "missing_fs.h"
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "fd-util.h"
|
#include "fd-util.h"
|
||||||
#include "fileio.h"
|
#include "fileio.h"
|
||||||
#include "fs-util.h"
|
#include "fs-util.h"
|
||||||
|
#include "log.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
#include "strv.h"
|
#include "strv.h"
|
||||||
#include "tmpfile-util.h"
|
#include "tmpfile-util.h"
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "errno-util.h"
|
#include "errno-util.h"
|
||||||
#include "escape.h"
|
#include "escape.h"
|
||||||
#include "extract-word.h"
|
#include "extract-word.h"
|
||||||
|
#include "log.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "parse-util.h"
|
#include "parse-util.h"
|
||||||
#include "path-util.h"
|
#include "path-util.h"
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "ether-addr-util.h"
|
#include "ether-addr-util.h"
|
||||||
#include "hexdecoct.h"
|
#include "hexdecoct.h"
|
||||||
|
#include "log.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "fileio.h"
|
#include "fileio.h"
|
||||||
#include "fs-util.h"
|
#include "fs-util.h"
|
||||||
#include "io-util.h"
|
#include "io-util.h"
|
||||||
|
#include "log.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "missing_fcntl.h"
|
#include "missing_fcntl.h"
|
||||||
#include "missing_fs.h"
|
#include "missing_fs.h"
|
||||||
|
@ -1001,13 +1002,13 @@ int fd_verify_safe_flags_full(int fd, int extra_flags) {
|
||||||
if (flags < 0)
|
if (flags < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
unexpected_flags = flags & ~(O_ACCMODE|O_NOFOLLOW|RAW_O_LARGEFILE|extra_flags);
|
unexpected_flags = flags & ~(O_ACCMODE_STRICT|O_NOFOLLOW|RAW_O_LARGEFILE|extra_flags);
|
||||||
if (unexpected_flags != 0)
|
if (unexpected_flags != 0)
|
||||||
return log_debug_errno(SYNTHETIC_ERRNO(EREMOTEIO),
|
return log_debug_errno(SYNTHETIC_ERRNO(EREMOTEIO),
|
||||||
"Unexpected flags set for extrinsic fd: 0%o",
|
"Unexpected flags set for extrinsic fd: 0%o",
|
||||||
(unsigned) unexpected_flags);
|
(unsigned) unexpected_flags);
|
||||||
|
|
||||||
return flags & (O_ACCMODE | extra_flags); /* return the flags variable, but remove the noise */
|
return flags & (O_ACCMODE_STRICT | extra_flags); /* return the flags variable, but remove the noise */
|
||||||
}
|
}
|
||||||
|
|
||||||
int read_nr_open(void) {
|
int read_nr_open(void) {
|
||||||
|
@ -1132,7 +1133,7 @@ int fds_are_same_mount(int fd1, int fd2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* accmode_to_string(int flags) {
|
const char* accmode_to_string(int flags) {
|
||||||
switch (flags & O_ACCMODE) {
|
switch (flags & O_ACCMODE_STRICT) {
|
||||||
case O_RDONLY:
|
case O_RDONLY:
|
||||||
return "ro";
|
return "ro";
|
||||||
case O_WRONLY:
|
case O_WRONLY:
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||||
|
|
||||||
#include "format-ifname.h"
|
#include "format-ifname.h"
|
||||||
|
#include "log.h"
|
||||||
|
#include "stdio-util.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
|
|
||||||
assert_cc(STRLEN("%") + DECIMAL_STR_MAX(int) <= IF_NAMESIZE);
|
assert_cc(STRLEN("%") + DECIMAL_STR_MAX(int) <= IF_NAMESIZE);
|
||||||
|
|
|
@ -1036,7 +1036,7 @@ int open_mkdir_at_full(int dirfd, const char *path, int flags, XOpenFlags xopen_
|
||||||
|
|
||||||
if (flags & ~(O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_EXCL|O_NOATIME|O_NOFOLLOW|O_PATH))
|
if (flags & ~(O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_EXCL|O_NOATIME|O_NOFOLLOW|O_PATH))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if ((flags & O_ACCMODE) != O_RDONLY)
|
if ((flags & O_ACCMODE_STRICT) != O_RDONLY)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* Note that O_DIRECTORY|O_NOFOLLOW is implied, but we allow specifying it anyway. The following
|
/* Note that O_DIRECTORY|O_NOFOLLOW is implied, but we allow specifying it anyway. The following
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "gcrypt-util.h"
|
#include "gcrypt-util.h"
|
||||||
#include "hexdecoct.h"
|
#include "hexdecoct.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
static void *gcrypt_dl = NULL;
|
static void *gcrypt_dl = NULL;
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "dirent-util.h"
|
#include "dirent-util.h"
|
||||||
#include "errno-util.h"
|
#include "errno-util.h"
|
||||||
#include "glob-util.h"
|
#include "glob-util.h"
|
||||||
|
#include "log.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "path-util.h"
|
#include "path-util.h"
|
||||||
#include "strv.h"
|
#include "strv.h"
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
#include "fileio.h"
|
#include "fileio.h"
|
||||||
#include "hashmap.h"
|
#include "hashmap.h"
|
||||||
|
#include "log.h"
|
||||||
#include "logarithm.h"
|
#include "logarithm.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "memory-util.h"
|
#include "memory-util.h"
|
||||||
|
|
|
@ -90,6 +90,8 @@ OrderedHashmap* _ordered_hashmap_new(const struct hash_ops *hash_ops HASHMAP_DE
|
||||||
|
|
||||||
#define hashmap_free_and_replace(a, b) \
|
#define hashmap_free_and_replace(a, b) \
|
||||||
free_and_replace_full(a, b, hashmap_free)
|
free_and_replace_full(a, b, hashmap_free)
|
||||||
|
#define ordered_hashmap_free_and_replace(a, b) \
|
||||||
|
free_and_replace_full(a, b, ordered_hashmap_free)
|
||||||
|
|
||||||
HashmapBase* _hashmap_free(HashmapBase *h, free_func_t default_free_key, free_func_t default_free_value);
|
HashmapBase* _hashmap_free(HashmapBase *h, free_func_t default_free_key, free_func_t default_free_value);
|
||||||
static inline Hashmap* hashmap_free(Hashmap *h) {
|
static inline Hashmap* hashmap_free(Hashmap *h) {
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
#include "env-file.h"
|
#include "env-file.h"
|
||||||
#include "hostname-util.h"
|
#include "hostname-util.h"
|
||||||
|
#include "log.h"
|
||||||
#include "os-util.h"
|
#include "os-util.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
#include "strv.h"
|
#include "strv.h"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "env-util.h"
|
#include "env-util.h"
|
||||||
#include "errno-util.h"
|
#include "errno-util.h"
|
||||||
#include "initrd-util.h"
|
#include "initrd-util.h"
|
||||||
|
#include "log.h"
|
||||||
#include "parse-util.h"
|
#include "parse-util.h"
|
||||||
#include "stat-util.h"
|
#include "stat-util.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||||
|
|
||||||
#include "keyring-util.h"
|
#include "keyring-util.h"
|
||||||
|
#include "log.h"
|
||||||
|
#include "alloc-util.h"
|
||||||
#include "memory-util.h"
|
#include "memory-util.h"
|
||||||
#include "missing_syscall.h"
|
#include "missing_syscall.h"
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
#include "cgroup-util.h"
|
#include "cgroup-util.h"
|
||||||
#include "limits-util.h"
|
#include "limits-util.h"
|
||||||
|
#include "log.h"
|
||||||
#include "memory-util.h"
|
#include "memory-util.h"
|
||||||
#include "parse-util.h"
|
#include "parse-util.h"
|
||||||
#include "process-util.h"
|
#include "process-util.h"
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue