mirror of
https://github.com/systemd/systemd
synced 2025-11-11 04:44:45 +01:00
Compare commits
No commits in common. "08de6f945d0eed5278a7fea7428e14b78fb83336" and "eced0d2a46774a40021fd8e5d624461bc107a46e" have entirely different histories.
08de6f945d
...
eced0d2a46
@ -627,7 +627,7 @@ static int analyze_plot(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, &use_full_bus);
|
r = acquire_bus(&bus, &use_full_bus);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
n = acquire_boot_times(bus, &boot);
|
n = acquire_boot_times(bus, &boot);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
@ -1026,7 +1026,7 @@ static int analyze_critical_chain(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, NULL);
|
r = acquire_bus(&bus, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
n = acquire_time_data(bus, ×);
|
n = acquire_time_data(bus, ×);
|
||||||
if (n <= 0)
|
if (n <= 0)
|
||||||
@ -1069,7 +1069,7 @@ static int analyze_blame(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, NULL);
|
r = acquire_bus(&bus, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
n = acquire_time_data(bus, ×);
|
n = acquire_time_data(bus, ×);
|
||||||
if (n <= 0)
|
if (n <= 0)
|
||||||
@ -1126,7 +1126,7 @@ static int analyze_time(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, NULL);
|
r = acquire_bus(&bus, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
r = pretty_boot_time(bus, &buf);
|
r = pretty_boot_time(bus, &buf);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
@ -1264,7 +1264,7 @@ static int dot(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, NULL);
|
r = acquire_bus(&bus, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
r = expand_patterns(bus, strv_skip(argv, 1), &expanded_patterns);
|
r = expand_patterns(bus, strv_skip(argv, 1), &expanded_patterns);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
@ -1341,7 +1341,7 @@ static int dump(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, NULL);
|
r = acquire_bus(&bus, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
(void) pager_open(arg_pager_flags);
|
(void) pager_open(arg_pager_flags);
|
||||||
|
|
||||||
@ -1412,7 +1412,7 @@ static int set_log_level(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, NULL);
|
r = acquire_bus(&bus, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
r = bus_set_property(bus, bus_systemd_mgr, "LogLevel", &error, "s", argv[1]);
|
r = bus_set_property(bus, bus_systemd_mgr, "LogLevel", &error, "s", argv[1]);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
@ -1429,7 +1429,7 @@ static int get_log_level(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, NULL);
|
r = acquire_bus(&bus, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
r = bus_get_property_string(bus, bus_systemd_mgr, "LogLevel", &error, &level);
|
r = bus_get_property_string(bus, bus_systemd_mgr, "LogLevel", &error, &level);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
@ -1453,7 +1453,7 @@ static int set_log_target(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, NULL);
|
r = acquire_bus(&bus, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
r = bus_set_property(bus, bus_systemd_mgr, "LogTarget", &error, "s", argv[1]);
|
r = bus_set_property(bus, bus_systemd_mgr, "LogTarget", &error, "s", argv[1]);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
@ -1470,7 +1470,7 @@ static int get_log_target(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, NULL);
|
r = acquire_bus(&bus, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
r = bus_get_property_string(bus, bus_systemd_mgr, "LogTarget", &error, &target);
|
r = bus_get_property_string(bus, bus_systemd_mgr, "LogTarget", &error, &target);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
@ -2053,7 +2053,7 @@ static int service_watchdogs(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, NULL);
|
r = acquire_bus(&bus, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
/* get ServiceWatchdogs */
|
/* get ServiceWatchdogs */
|
||||||
@ -2091,7 +2091,7 @@ static int do_security(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
r = acquire_bus(&bus, NULL);
|
r = acquire_bus(&bus, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
(void) pager_open(arg_pager_flags);
|
(void) pager_open(arg_pager_flags);
|
||||||
|
|
||||||
|
|||||||
@ -197,7 +197,7 @@ static int run(int argc, char *argv[]) {
|
|||||||
arg_show_unit == SHOW_UNIT_USER,
|
arg_show_unit == SHOW_UNIT_USER,
|
||||||
&bus);
|
&bus);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
q = show_cgroup_get_unit_path_and_warn(bus, *name, &cgroup);
|
q = show_cgroup_get_unit_path_and_warn(bus, *name, &cgroup);
|
||||||
|
|||||||
@ -444,7 +444,7 @@ static int run(int argc, char *argv[]) {
|
|||||||
|
|
||||||
r = bus_connect_transport(arg_transport, arg_host, false, &bus);
|
r = bus_connect_transport(arg_transport, arg_host, false, &bus);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
return hostnamectl_main(bus, argc, argv);
|
return hostnamectl_main(bus, argc, argv);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -511,7 +511,7 @@ static int run(int argc, char *argv[]) {
|
|||||||
|
|
||||||
r = bus_connect_transport(arg_transport, arg_host, false, &bus);
|
r = bus_connect_transport(arg_transport, arg_host, false, &bus);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
return localectl_main(bus, argc, argv);
|
return localectl_main(bus, argc, argv);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1475,7 +1475,7 @@ static int run(int argc, char *argv[]) {
|
|||||||
|
|
||||||
r = bus_connect_transport(arg_transport, arg_host, false, &bus);
|
r = bus_connect_transport(arg_transport, arg_host, false, &bus);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
(void) sd_bus_set_allow_interactive_authorization(bus, arg_ask_password);
|
(void) sd_bus_set_allow_interactive_authorization(bus, arg_ask_password);
|
||||||
|
|
||||||
|
|||||||
@ -2855,14 +2855,14 @@ static int method_set_reboot_to_boot_loader_menu(
|
|||||||
return r;
|
return r;
|
||||||
} else {
|
} else {
|
||||||
if (x == UINT64_MAX) {
|
if (x == UINT64_MAX) {
|
||||||
if (unlink("/run/systemd/reboot-to-boot-loader-menu") < 0 && errno != ENOENT)
|
if (unlink("/run/systemd/reboot-to-loader-menu") < 0 && errno != ENOENT)
|
||||||
return -errno;
|
return -errno;
|
||||||
} else {
|
} else {
|
||||||
char buf[DECIMAL_STR_MAX(uint64_t) + 1];
|
char buf[DECIMAL_STR_MAX(uint64_t) + 1];
|
||||||
|
|
||||||
xsprintf(buf, "%" PRIu64, x); /* µs granularity */
|
xsprintf(buf, "%" PRIu64, x); /* µs granularity */
|
||||||
|
|
||||||
r = write_string_file_atomic_label("/run/systemd/reboot-to-boot-loader-menu", buf);
|
r = write_string_file_atomic_label("/run/systemd/reboot-to-loader-menu", buf);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2897,7 +2897,7 @@ static int run(int argc, char *argv[]) {
|
|||||||
|
|
||||||
r = bus_connect_transport(arg_transport, arg_host, false, &bus);
|
r = bus_connect_transport(arg_transport, arg_host, false, &bus);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
(void) sd_bus_set_allow_interactive_authorization(bus, arg_ask_password);
|
(void) sd_bus_set_allow_interactive_authorization(bus, arg_ask_password);
|
||||||
|
|
||||||
|
|||||||
@ -1456,7 +1456,7 @@ static int run(int argc, char* argv[]) {
|
|||||||
|
|
||||||
r = bus_connect_transport_systemd(arg_transport, arg_host, arg_user, &bus);
|
r = bus_connect_transport_systemd(arg_transport, arg_host, arg_user, &bus);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
if (arg_action == ACTION_UMOUNT)
|
if (arg_action == ACTION_UMOUNT)
|
||||||
return action_umount(bus, argc, argv);
|
return action_umount(bus, argc, argv);
|
||||||
|
|||||||
@ -1753,7 +1753,7 @@ static int run(int argc, char* argv[]) {
|
|||||||
else
|
else
|
||||||
r = bus_connect_transport_systemd(arg_transport, arg_host, arg_user, &bus);
|
r = bus_connect_transport_systemd(arg_transport, arg_host, arg_user, &bus);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
if (arg_scope)
|
if (arg_scope)
|
||||||
r = start_transient_scope(bus);
|
r = start_transient_scope(bus);
|
||||||
|
|||||||
@ -37,9 +37,6 @@ int bus_connect_user_systemd(sd_bus **_bus);
|
|||||||
int bus_connect_transport(BusTransport transport, const char *host, bool user, sd_bus **bus);
|
int bus_connect_transport(BusTransport transport, const char *host, bool user, sd_bus **bus);
|
||||||
int bus_connect_transport_systemd(BusTransport transport, const char *host, bool user, sd_bus **bus);
|
int bus_connect_transport_systemd(BusTransport transport, const char *host, bool user, sd_bus **bus);
|
||||||
|
|
||||||
#define bus_log_connect_error(r) \
|
|
||||||
log_error_errno(r, "Failed to create bus connection: %m")
|
|
||||||
|
|
||||||
#define bus_log_parse_error(r) \
|
#define bus_log_parse_error(r) \
|
||||||
log_error_errno(r, "Failed to parse bus message: %m")
|
log_error_errno(r, "Failed to parse bus message: %m")
|
||||||
|
|
||||||
|
|||||||
@ -371,7 +371,7 @@ int show_cgroup_get_path_and_warn(
|
|||||||
|
|
||||||
r = bus_connect_transport_systemd(BUS_TRANSPORT_LOCAL, NULL, false, &bus);
|
r = bus_connect_transport_systemd(BUS_TRANSPORT_LOCAL, NULL, false, &bus);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
r = show_cgroup_get_unit_path_and_warn(bus, unit, &root);
|
r = show_cgroup_get_unit_path_and_warn(bus, unit, &root);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
|||||||
@ -1062,7 +1062,7 @@ static int run(int argc, char *argv[]) {
|
|||||||
|
|
||||||
r = bus_connect_transport(arg_transport, arg_host, false, &bus);
|
r = bus_connect_transport(arg_transport, arg_host, false, &bus);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return bus_log_connect_error(r);
|
return log_error_errno(r, "Failed to create bus connection: %m");
|
||||||
|
|
||||||
return timedatectl_main(bus, argc, argv);
|
return timedatectl_main(bus, argc, argv);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,8 +4,6 @@
|
|||||||
set -ex
|
set -ex
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
export SYSTEMD_LOG_LEVEL=debug
|
|
||||||
|
|
||||||
cleanup()
|
cleanup()
|
||||||
{
|
{
|
||||||
if [ -z "${image_dir}" ]; then
|
if [ -z "${image_dir}" ]; then
|
||||||
@ -72,9 +70,6 @@ elif [ "${machine}" = "arm" ]; then
|
|||||||
elif [ "${machine}" = "ia64" ]; then
|
elif [ "${machine}" = "ia64" ]; then
|
||||||
root_guid=993d8d3d-f80e-4225-855a-9daf8ed7ea97
|
root_guid=993d8d3d-f80e-4225-855a-9daf8ed7ea97
|
||||||
verity_guid=86ed10d5-b607-45bb-8957-d350f23d0571
|
verity_guid=86ed10d5-b607-45bb-8957-d350f23d0571
|
||||||
else
|
|
||||||
echo "Unexpected uname -m: ${machine} in testsuite-50.sh, please fix me"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
# du rounds up to block size, which is more helpful for partitioning
|
# du rounds up to block size, which is more helpful for partitioning
|
||||||
root_size="$(du -k ${image}.raw | cut -f1)"
|
root_size="$(du -k ${image}.raw | cut -f1)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user