Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 20 additions & 18 deletions .github/workflows/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
meson==1.9.1 \
--hash=sha256:f824ab770c041a202f532f69e114c971918ed2daff7ea56583d80642564598d0
ninja==1.11.1.4 \
--hash=sha256:055f386fb550c2c9d6157e45e20a84d29c47968876b9c5794ae2aec46f952306 \
--hash=sha256:096487995473320de7f65d622c3f1d16c3ad174797602218ca8c967f51ec38a0 \
--hash=sha256:2ab67a41c90bea5ec4b795bab084bc0b3b3bb69d3cd21ca0294fc0fc15a111eb \
--hash=sha256:4617b3c12ff64b611a7d93fd9e378275512bb36eff8babff7c83f5116b4f8d66 \
--hash=sha256:5713cf50c5be50084a8693308a63ecf9e55c3132a78a41ab1363a28b6caaaee1 \
--hash=sha256:6aa39f6e894e0452e5b297327db00019383ae55d5d9c57c73b04f13bf79d438a \
--hash=sha256:9c29bb66d2aa46a2409ab369ea804c730faec7652e8c22c1e428cc09216543e5 \
--hash=sha256:b33923c8da88e8da20b6053e38deb433f53656441614207e01d283ad02c5e8e7 \
--hash=sha256:c3b96bd875f3ef1db782470e9e41d7508905a0986571f219d20ffed238befa15 \
--hash=sha256:cede0af00b58e27b31f2482ba83292a8e9171cdb9acc2c867a3b6e40b3353e43 \
--hash=sha256:cf4453679d15babc04ba023d68d091bb613091b67101c88f85d2171c6621c6eb \
--hash=sha256:cf554e73f72c04deb04d0cf51f5fdb1903d9c9ca3d2344249c8ce3bd616ebc02 \
--hash=sha256:cfdd09776436a1ff3c4a2558d3fc50a689fb9d7f1bdbc3e6f7b8c2991341ddb3 \
--hash=sha256:d3090d4488fadf6047d0d7a1db0c9643a8d391f0d94729554dbb89b5bdc769d7 \
--hash=sha256:d4a6f159b08b0ac4aca5ee1572e3e402f969139e71d85d37c0e2872129098749 \
--hash=sha256:ecce44a00325a93631792974659cf253a815cc6da4ec96f89742925dfc295a0d \
--hash=sha256:f6186d7607bb090c3be1e10c8a56b690be238f953616626f5032238c66e56867
ninja==1.13.0 \
--hash=sha256:11be2d22027bde06f14c343f01d31446747dbb51e72d00decca2eb99be911e2f \
--hash=sha256:1c97223cdda0417f414bf864cfb73b72d8777e57ebb279c5f6de368de0062988 \
--hash=sha256:3c0b40b1f0bba764644385319028650087b4c1b18cdfa6f45cb39a3669b81aa9 \
--hash=sha256:3d00c692fb717fd511abeb44b8c5d00340c36938c12d6538ba989fe764e79630 \
--hash=sha256:3d7d7779d12cb20c6d054c61b702139fd23a7a964ec8f2c823f1ab1b084150db \
--hash=sha256:4a40ce995ded54d9dc24f8ea37ff3bf62ad192b547f6c7126e7e25045e76f978 \
--hash=sha256:4be9c1b082d244b1ad7ef41eb8ab088aae8c109a9f3f0b3e56a252d3e00f42c1 \
--hash=sha256:5f8e1e8a1a30835eeb51db05cf5a67151ad37542f5a4af2a438e9490915e5b72 \
--hash=sha256:60056592cf495e9a6a4bea3cd178903056ecb0943e4de45a2ea825edb6dc8d3e \
--hash=sha256:6739d3352073341ad284246f81339a384eec091d9851a886dfa5b00a6d48b3e2 \
--hash=sha256:8cfbb80b4a53456ae8a39f90ae3d7a2129f45ea164f43fadfa15dc38c4aef1c9 \
--hash=sha256:aa45b4037b313c2f698bc13306239b8b93b4680eb47e287773156ac9e9304714 \
--hash=sha256:b4f2a072db3c0f944c32793e91532d8948d20d9ab83da9c0c7c15b5768072200 \
--hash=sha256:be7f478ff9f96a128b599a964fc60a6a87b9fa332ee1bd44fa243ac88d50291c \
--hash=sha256:d741a5e6754e0bda767e3274a0f0deeef4807f1fec6c0d7921a0244018926ae5 \
--hash=sha256:e8bad11f8a00b64137e9b315b137d8bb6cbf3086fbdc43bf1f90fd33324d2e96 \
--hash=sha256:fa2a8bfc62e31b08f83127d1613d10821775a0eb334197154c4d6067b7068ff1 \
--hash=sha256:fb46acf6b93b8dd0322adc3a4945452a4e774b75b91293bafcc7b7f8e6517dfa \
--hash=sha256:fb8ee8719f8af47fed145cced4a85f0755dd55d45b2bddaf7431fa89803c5f3e
2 changes: 1 addition & 1 deletion src/analyze/analyze-blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int verb_blame(int argc, char *argv[], void *userdata) {
if (r < 0)
return bus_log_connect_error(r, arg_transport, arg_runtime_scope);

n = acquire_time_data(bus, /* require_finished= */ false, &times);
n = acquire_time_data(bus, /* require_finished = */ false, &times);
if (n <= 0)
return n;

Expand Down
34 changes: 17 additions & 17 deletions src/analyze/analyze-condition.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static int parse_condition(Unit *u, const char *line) {
assert(u);
assert(line);

line = skip_leading_chars(line, /* bad= */ NULL);
line = skip_leading_chars(line, /* bad = */ NULL);

const char *eq = strchr(line, '=');
if (!eq)
Expand All @@ -27,7 +27,7 @@ static int parse_condition(Unit *u, const char *line) {
if (!type_string)
return log_oom();

delete_trailing_chars(type_string, /* bad= */ NULL);
delete_trailing_chars(type_string, /* bad = */ NULL);

Condition **target;
ConditionType type;
Expand All @@ -41,24 +41,24 @@ static int parse_condition(Unit *u, const char *line) {
if (type < 0)
return log_error_errno(type, "Cannot parse \"%s\".", line);

const char *val = skip_leading_chars(eq + 1, /* bad= */ NULL);
const char *val = skip_leading_chars(eq + 1, /* bad = */ NULL);

ConfigParserCallback callback;
if (condition_takes_path(type))
callback = config_parse_unit_condition_path;
else
callback = config_parse_unit_condition_string;

return callback(/* unit= */ NULL,
/* filename= */ "(cmdline)",
/* line= */ 0,
/* section= */ NULL,
/* section_line= */ 0,
/* lvalue= */ type_string,
/* ltype= */ type,
/* rvalue= */ val,
/* data= */ target,
/* userdata= */ u);
return callback(/* unit = */ NULL,
/* filename = */ "(cmdline)",
/* line = */ 0,
/* section = */ NULL,
/* section_line = */ 0,
/* lvalue = */ type_string,
/* ltype = */ type,
/* rvalue = */ val,
/* data = */ target,
/* userdata = */ u);
}

_printf_(7, 8)
Expand All @@ -72,10 +72,10 @@ static int log_helper(void *userdata, int level, int error, const char *file, in

va_start(ap, format);
r = log_object_internalv(level, error, file, line, func,
/* object_field= */ unit_log_field(u),
/* object= */ u->id,
/* extra_field= */ NULL,
/* extra= */ NULL,
/* object_field = */ unit_log_field(u),
/* object = */ u->id,
/* extra_field = */ NULL,
/* extra = */ NULL,
format, ap);
va_end(ap);

Expand Down
6 changes: 3 additions & 3 deletions src/analyze/analyze-critical-chain.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static int list_dependencies_one(sd_bus *bus, const char *name, unsigned level,

typesafe_qsort(deps, strv_length(deps), list_dependencies_compare);

r = acquire_boot_times(bus, /* require_finished= */ true, &boot);
r = acquire_boot_times(bus, /* require_finished = */ true, &boot);
if (r < 0)
return r;

Expand Down Expand Up @@ -183,7 +183,7 @@ static int list_dependencies(sd_bus *bus, const char *name) {

times = hashmap_get(unit_times_hashmap, id);

r = acquire_boot_times(bus, /* require_finished= */ true, &boot);
r = acquire_boot_times(bus, /* require_finished = */ true, &boot);
if (r < 0)
return r;

Expand All @@ -210,7 +210,7 @@ int verb_critical_chain(int argc, char *argv[], void *userdata) {
if (r < 0)
return bus_log_connect_error(r, arg_transport, arg_runtime_scope);

n = acquire_time_data(bus, /* require_finished= */ true, &times);
n = acquire_time_data(bus, /* require_finished = */ true, &times);
if (n <= 0)
return n;

Expand Down
2 changes: 1 addition & 1 deletion src/analyze/analyze-fdstore.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static int dump_fdstore(sd_bus *bus, const char *arg) {
if (table_isempty(table) && !sd_json_format_enabled(arg_json_format_flags))
log_info("No file descriptors in fdstore of '%s'.", unit);
else {
r = table_print_with_pager(table, arg_json_format_flags, arg_pager_flags, /* show_header= */ true);
r = table_print_with_pager(table, arg_json_format_flags, arg_pager_flags, /* show_header= */true);
if (r < 0)
return r;
}
Expand Down
4 changes: 2 additions & 2 deletions src/analyze/analyze-pcrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static int get_current_pcr(const char *alg, uint32_t pcr, void **ret, size_t *re
if (r < 0)
return log_error_errno(r, "Failed to read '%s': %m", p);

r = unhexmem_full(s, ss, /* secure= */ false, &buf, &bufsize);
r = unhexmem_full(s, ss, /* secure = */ false, &buf, &bufsize);
if (r < 0)
return log_error_errno(r, "Failed to decode hex PCR data '%s': %m", s);

Expand Down Expand Up @@ -141,7 +141,7 @@ int verb_pcrs(int argc, char *argv[], void *userdata) {
return r;
}

r = table_print_with_pager(table, arg_json_format_flags, arg_pager_flags, /* show_header= */ true);
r = table_print_with_pager(table, arg_json_format_flags, arg_pager_flags, /* show_header= */true);
if (r < 0)
return r;

Expand Down
4 changes: 2 additions & 2 deletions src/analyze/analyze-plot.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ int verb_plot(int argc, char *argv[], void *userdata) {
if (r < 0)
return bus_log_connect_error(r, arg_transport, arg_runtime_scope);

n = acquire_boot_times(bus, /* require_finished= */ true, &boot);
n = acquire_boot_times(bus, /* require_finished = */ true, &boot);
if (n < 0)
return n;

Expand All @@ -497,7 +497,7 @@ int verb_plot(int argc, char *argv[], void *userdata) {
return n;
}

n = acquire_time_data(bus, /* require_finished= */ true, &times);
n = acquire_time_data(bus, /* require_finished = */ true, &times);
if (n <= 0)
return n;

Expand Down
12 changes: 6 additions & 6 deletions src/analyze/analyze-security.c
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,7 @@ static int assess(const SecurityInfo *info,
return log_error_errno(r, "Failed to set columns to display: %m");
}

r = table_print_with_pager(details_table, json_format_flags, pager_flags, /* show_header= */ true);
r = table_print_with_pager(details_table, json_format_flags, pager_flags, /* show_header= */true);
if (r < 0)
return r;
}
Expand Down Expand Up @@ -2897,7 +2897,7 @@ static int analyze_security(sd_bus *bus,
fflush(stdout);
}

r = table_print_with_pager(overview_table, json_format_flags, pager_flags, /* show_header= */ true);
r = table_print_with_pager(overview_table, json_format_flags, pager_flags, /* show_header= */true);
if (r < 0)
return r;
}
Expand All @@ -2919,19 +2919,19 @@ int verb_security(int argc, char *argv[], void *userdata) {

unsigned line = 0, column = 0;
if (arg_security_policy) {
r = sd_json_parse_file(/* f= */ NULL, arg_security_policy, /* flags= */ 0, &policy, &line, &column);
r = sd_json_parse_file(/*f=*/ NULL, arg_security_policy, /*flags=*/ 0, &policy, &line, &column);
if (r < 0)
return log_error_errno(r, "Failed to parse '%s' at %u:%u: %m", arg_security_policy, line, column);
} else {
_cleanup_fclose_ FILE *f = NULL;
_cleanup_free_ char *pp = NULL;

r = search_and_fopen_nulstr("systemd-analyze-security.policy", "re", /* root= */ NULL, CONF_PATHS_NULSTR("systemd"), &f, &pp);
r = search_and_fopen_nulstr("systemd-analyze-security.policy", "re", /*root=*/ NULL, CONF_PATHS_NULSTR("systemd"), &f, &pp);
if (r < 0 && r != -ENOENT)
return r;

if (f) {
r = sd_json_parse_file(f, pp, /* flags= */ 0, &policy, &line, &column);
r = sd_json_parse_file(f, pp, /*flags=*/ 0, &policy, &line, &column);
if (r < 0)
return log_error_errno(r, "[%s:%u:%u] Failed to parse JSON policy: %m", pp, line, column);
}
Expand All @@ -2950,5 +2950,5 @@ int verb_security(int argc, char *argv[], void *userdata) {
arg_profile,
arg_json_format_flags,
arg_pager_flags,
/* flags= */ 0);
/*flags=*/ 0);
}
2 changes: 1 addition & 1 deletion src/analyze/analyze-time-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ int pretty_boot_time(sd_bus *bus, char **ret) {
BootTimes *t;
int r;

r = acquire_boot_times(bus, /* require_finished= */ true, &t);
r = acquire_boot_times(bus, /* require_finished = */ true, &t);
if (r < 0)
return r;

Expand Down
2 changes: 1 addition & 1 deletion src/analyze/analyze-unit-gdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int verb_unit_gdb(int argc, char *argv[], void *userdata) {
} else
assert_not_reached();

r = strv_extend_strv(&debugger_call, arg_debugger_args, /* filter_duplicates= */ false);
r = strv_extend_strv(&debugger_call, arg_debugger_args, /* filter_duplicates = */ false);
if (r < 0)
return log_oom();

Expand Down
2 changes: 1 addition & 1 deletion src/analyze/analyze-verify-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int verify_unit(Unit *u, bool check_man, const char *root) {
unit_dump(u, stdout, "\t");

log_unit_debug(u, "Creating %s/start job", u->id);
r = manager_add_job(u->manager, JOB_START, u, JOB_REPLACE, &error, /* ret= */ NULL);
r = manager_add_job(u->manager, JOB_START, u, JOB_REPLACE, &error, /* ret = */ NULL);
if (r < 0)
log_unit_error_errno(u, r, "Failed to create %s/start: %s", u->id, bus_error_message(&error, r));

Expand Down
14 changes: 7 additions & 7 deletions src/backlight/backlight.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ static int has_multiple_graphics_cards(void) {
if (r < 0)
return r;

r = sd_device_enumerator_add_match_subsystem(e, "pci", /* match= */ true);
r = sd_device_enumerator_add_match_subsystem(e, "pci", /* match = */ true);
if (r < 0)
return r;

/* class is an unsigned number, let's validate the value later. */
r = sd_device_enumerator_add_match_sysattr(e, "class", NULL, /* match= */ true);
r = sd_device_enumerator_add_match_sysattr(e, "class", NULL, /* match = */ true);
if (r < 0)
return r;

Expand Down Expand Up @@ -233,19 +233,19 @@ static int validate_device(sd_device *device) {
if (r < 0)
return log_debug_errno(r, "Failed to allow uninitialized devices: %m");

r = sd_device_enumerator_add_match_subsystem(enumerate, "backlight", /* match= */ true);
r = sd_device_enumerator_add_match_subsystem(enumerate, "backlight", /* match = */ true);
if (r < 0)
return log_debug_errno(r, "Failed to add subsystem match: %m");

r = sd_device_enumerator_add_nomatch_sysname(enumerate, sysname);
if (r < 0)
return log_debug_errno(r, "Failed to add sysname unmatch: %m");

r = sd_device_enumerator_add_match_sysattr(enumerate, "type", "platform", /* match= */ true);
r = sd_device_enumerator_add_match_sysattr(enumerate, "type", "platform", /* match = */ true);
if (r < 0)
return log_debug_errno(r, "Failed to add sysattr match: %m");

r = sd_device_enumerator_add_match_sysattr(enumerate, "type", "firmware", /* match= */ true);
r = sd_device_enumerator_add_match_sysattr(enumerate, "type", "firmware", /* match = */ true);
if (r < 0)
return log_debug_errno(r, "Failed to add sysattr match: %m");

Expand Down Expand Up @@ -591,9 +591,9 @@ static int verb_load(int argc, char *argv[], void *userdata) {
if (r < 0)
return log_device_error_errno(device, r, "Failed to read current brightness: %m");

(void) clamp_brightness(device, percent, /* saved= */ false, max_brightness, &brightness);
(void) clamp_brightness(device, percent, /* saved = */ false, max_brightness, &brightness);
} else if (clamp)
(void) clamp_brightness(device, percent, /* saved= */ true, max_brightness, &brightness);
(void) clamp_brightness(device, percent, /* saved = */ true, max_brightness, &brightness);

r = sd_device_set_sysattr_valuef(device, "brightness", "%u", brightness);
if (r < 0)
Expand Down
8 changes: 4 additions & 4 deletions src/basic/build-path.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ int pin_callout_binary(const char *path, char **ret_path) {
const char *e;
if (find_environment_binary(fn, &e) >= 0) {
/* The environment variable counts. We'd fail if the executable is not available/invalid. */
r = open_and_check_executable(e, /* root= */ NULL, ret_path, &fd);
r = open_and_check_executable(e, /* root = */ NULL, ret_path, &fd);
if (r < 0)
return r;

Expand All @@ -273,13 +273,13 @@ int pin_callout_binary(const char *path, char **ret_path) {

_cleanup_free_ char *np = NULL;
if (find_build_dir_binary(fn, &np) >= 0) {
r = open_and_check_executable(np, /* root= */ NULL, ret_path, &fd);
r = open_and_check_executable(np, /* root = */ NULL, ret_path, &fd);
if (r >= 0)
return fd;
}

r = find_executable_full(path, /* root= */ NULL,
/* exec_search_path= */ NULL, /* use_path_envvar= */ true,
r = find_executable_full(path, /* root = */ NULL,
/* exec_search_path = */ NULL, /* use_path_envvar = */ true,
ret_path, &fd);
if (r < 0)
return r;
Expand Down
Loading
Loading