tree-wide: replace tab with space, adjust missing or duplicated space

This commit is contained in:
Yu Watanabe
2025-11-24 12:59:22 +09:00
committed by Zbigniew Jędrzejewski-Szmek
parent 332bce5bd7
commit f866ff3df8
10 changed files with 56 additions and 56 deletions

View File

@@ -4,47 +4,47 @@ local context state state_descr line
typeset -A val_args typeset -A val_args
_values -S: kind \ _values -S: kind \
'unix[a unix domain socket]:unix properties:->unix' \ 'unix[a unix domain socket]:unix properties:->unix' \
'tcp[a tcp socket]:tcp properties:->tcp' \ 'tcp[a tcp socket]:tcp properties:->tcp' \
'unixexec[a process]:unixexec properties:->unixexec' \ 'unixexec[a process]:unixexec properties:->unixexec' \
'x-machine-unix[a container]:machine properties:->x-machine-unix' 'x-machine-unix[a container]:machine properties:->x-machine-unix'
_sd_bus_get_guid() { _sd_bus_get_guid() {
local TYPE VALUE local TYPE VALUE
local -a busname=(org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus) local -a busname=(org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus)
_call_program -l dbus-guid busctl call $busname GetId | _call_program -l dbus-guid busctl call $busname GetId |
while read TYPE VALUE; do while read TYPE VALUE; do
[[ $TYPE == 's' && -n $VALUE ]] && compadd "$@" - ${(Q)VALUE}; [[ $TYPE == 's' && -n $VALUE ]] && compadd "$@" - ${(Q)VALUE};
done done
} }
local expl ret local expl ret
case $context in case $context in
unix) unix)
_values -s, 'unix socket properties' \ _values -s, 'unix socket properties' \
'guid[bus guid]:bus guid:_sd_bus_get_guid -qS,' \ 'guid[bus guid]:bus guid:_sd_bus_get_guid -qS,' \
'(abstract)path[unix domain socket path]:path:_files -r, -g "*(=)"' \ '(abstract)path[unix domain socket path]:path:_files -r, -g "*(=)"' \
'(path)abstract[unix domain socket path in the abstract namespace]:abstract path:_files -r, -P@ -g "*(=)"' \ '(path)abstract[unix domain socket path in the abstract namespace]:abstract path:_files -r, -P@ -g "*(=)"' \
'uid[unix uid]:uid:_numbers' \ 'uid[unix uid]:uid:_numbers' \
'gid[unix gid]:gid:_numbers' 'gid[unix gid]:gid:_numbers'
;; ;;
tcp) tcp)
_values -s, 'unix socket properties' \ _values -s, 'unix socket properties' \
'guid[bus guid]:bus guid:_sd_bus_get_guid -qS,' \ 'guid[bus guid]:bus guid:_sd_bus_get_guid -qS,' \
'host[hostname]:hostname:_hosts -r,'\ 'host[hostname]:hostname:_hosts -r,'\
'port[port]:port:_numbers' \ 'port[port]:port:_numbers' \
'family[address family]:address family:(ipv4 ipv6)' 'family[address family]:address family:(ipv4 ipv6)'
;; ;;
unixexec) unixexec)
_values -s, 'unixexec properties' \ _values -s, 'unixexec properties' \
'guid[bus guid]:bus guid:_sd_bus_get_guid -qS,' \ 'guid[bus guid]:bus guid:_sd_bus_get_guid -qS,' \
'path[command path]:command path:_absolute_command_paths -r,'\ 'path[command path]:command path:_absolute_command_paths -r,'\
;; ;;
x-machine-unix) x-machine-unix)
_values -s, 'machine properties' \ _values -s, 'machine properties' \
'guid[bus guid]:bus guid:_sd_bus_get_guid -qS,' \ 'guid[bus guid]:bus guid:_sd_bus_get_guid -qS,' \
'(pid)machine[machine]:machine:_call_function ret _sd_machines' \ '(pid)machine[machine]:machine:_call_function ret _sd_machines' \
'(machine)pid[pid]:pid:_pids' '(machine)pid[pid]:pid:_pids'
;; ;;
esac esac

View File

@@ -11,7 +11,7 @@
*/ */
enum pcapng_block_types { enum pcapng_block_types {
PCAPNG_INTERFACE_BLOCK = 1, PCAPNG_INTERFACE_BLOCK = 1,
PCAPNG_PACKET_BLOCK, /* Obsolete */ PCAPNG_PACKET_BLOCK, /* Obsolete */
PCAPNG_SIMPLE_PACKET_BLOCK, PCAPNG_SIMPLE_PACKET_BLOCK,
PCAPNG_NAME_RESOLUTION_BLOCK, PCAPNG_NAME_RESOLUTION_BLOCK,
PCAPNG_INTERFACE_STATS_BLOCK, PCAPNG_INTERFACE_STATS_BLOCK,
@@ -51,7 +51,7 @@ enum pcapng_section_opt {
}; };
struct pcapng_interface_block { struct pcapng_interface_block {
uint32_t block_type; /* 1 */ uint32_t block_type; /* 1 */
uint32_t block_length; uint32_t block_length;
uint16_t link_type; uint16_t link_type;
uint16_t reserved; uint16_t reserved;
@@ -59,7 +59,7 @@ struct pcapng_interface_block {
}; };
enum pcapng_interface_options { enum pcapng_interface_options {
PCAPNG_IFB_NAME = 2, PCAPNG_IFB_NAME = 2,
PCAPNG_IFB_DESCRIPTION, PCAPNG_IFB_DESCRIPTION,
PCAPNG_IFB_IPV4ADDR, PCAPNG_IFB_IPV4ADDR,
PCAPNG_IFB_IPV6ADDR, PCAPNG_IFB_IPV6ADDR,
@@ -76,7 +76,7 @@ enum pcapng_interface_options {
}; };
struct pcapng_enhance_packet_block { struct pcapng_enhance_packet_block {
uint32_t block_type; /* 6 */ uint32_t block_type; /* 6 */
uint32_t block_length; uint32_t block_length;
uint32_t interface_id; uint32_t interface_id;
uint32_t timestamp_hi; uint32_t timestamp_hi;
@@ -99,7 +99,7 @@ enum pcapng_epb_options {
}; };
struct pcapng_statistics_block { struct pcapng_statistics_block {
uint32_t block_type; /* 5 */ uint32_t block_type; /* 5 */
uint32_t block_length; uint32_t block_length;
uint32_t interface_id; uint32_t interface_id;
uint32_t timestamp_hi; uint32_t timestamp_hi;

View File

@@ -2622,7 +2622,7 @@ static int exec_context_deserialize(ExecContext *c, FILE *f) {
return r; return r;
} else if ((val = startswith(l, "exec-context-root-hash-sig="))) { } else if ((val = startswith(l, "exec-context-root-hash-sig="))) {
iovec_done(&c->root_hash_sig); iovec_done(&c->root_hash_sig);
r= unbase64mem(val, &c->root_hash_sig.iov_base, &c->root_hash_sig.iov_len); r = unbase64mem(val, &c->root_hash_sig.iov_base, &c->root_hash_sig.iov_len);
if (r < 0) if (r < 0)
return r; return r;
} else if ((val = startswith(l, "exec-context-root-ephemeral="))) { } else if ((val = startswith(l, "exec-context-root-ephemeral="))) {

View File

@@ -21,7 +21,7 @@ static inline bool efi_guid_equal(const EFI_GUID *a, const EFI_GUID *b) {
typedef struct { typedef struct {
EFI_GUID SignatureOwner; EFI_GUID SignatureOwner;
uint8_t SignatureData[]; uint8_t SignatureData[];
} EFI_SIGNATURE_DATA; } EFI_SIGNATURE_DATA;
typedef struct { typedef struct {

View File

@@ -9,9 +9,9 @@ BindReadOnlyPaths=/run/dbus/system_bus_socket
DynamicUser=yes DynamicUser=yes
RemoveIPC=yes RemoveIPC=yes
CapabilityBoundingSet=CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_FOWNER \ CapabilityBoundingSet=CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_FOWNER \
CAP_FSETID CAP_IPC_LOCK CAP_IPC_OWNER CAP_KILL CAP_MKNOD CAP_NET_ADMIN \ CAP_FSETID CAP_IPC_LOCK CAP_IPC_OWNER CAP_KILL CAP_MKNOD CAP_NET_ADMIN \
CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_SETGID CAP_SETPCAP \ CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_SETGID CAP_SETPCAP \
CAP_SETUID CAP_SYS_ADMIN CAP_SYS_CHROOT CAP_SYS_NICE CAP_SYS_RESOURCE CAP_SETUID CAP_SYS_ADMIN CAP_SYS_CHROOT CAP_SYS_NICE CAP_SYS_RESOURCE
PrivateDevices=yes PrivateDevices=yes
PrivateUsers=yes PrivateUsers=yes
ProtectSystem=strict ProtectSystem=strict

View File

@@ -8,8 +8,8 @@ BindReadOnlyPaths=/run/dbus/system_bus_socket
DynamicUser=yes DynamicUser=yes
RemoveIPC=yes RemoveIPC=yes
CapabilityBoundingSet=CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_FOWNER \ CapabilityBoundingSet=CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_FOWNER \
CAP_FSETID CAP_IPC_LOCK CAP_IPC_OWNER CAP_KILL CAP_MKNOD CAP_SETGID CAP_SETPCAP \ CAP_FSETID CAP_IPC_LOCK CAP_IPC_OWNER CAP_KILL CAP_MKNOD CAP_SETGID CAP_SETPCAP \
CAP_SETUID CAP_SYS_ADMIN CAP_SYS_CHROOT CAP_SYS_NICE CAP_SYS_RESOURCE CAP_SETUID CAP_SYS_ADMIN CAP_SYS_CHROOT CAP_SYS_NICE CAP_SYS_RESOURCE
PrivateDevices=yes PrivateDevices=yes
PrivateUsers=yes PrivateUsers=yes
ProtectSystem=strict ProtectSystem=strict

View File

@@ -2037,14 +2037,14 @@ static int manager_add_bus_objects(Manager *m) {
static bool manager_is_idle(void *userdata) { static bool manager_is_idle(void *userdata) {
Manager *m = ASSERT_PTR(userdata); Manager *m = ASSERT_PTR(userdata);
return hashmap_isempty(m->jobs); return hashmap_isempty(m->jobs);
} }
static void manager_check_idle(Manager *m) { static void manager_check_idle(Manager *m) {
assert(m); assert(m);
if (!hashmap_isempty(m->jobs)) if (!hashmap_isempty(m->jobs))
return; return;
hashmap_clear(m->targets); hashmap_clear(m->targets);
log_debug("Cleared target cache"); log_debug("Cleared target cache");

View File

@@ -655,7 +655,7 @@ static int check_describe_finished(sd_bus_message *reply, void *userdata, sd_bus
_cleanup_(version_done) Version v = {}; _cleanup_(version_done) Version v = {};
_cleanup_free_ char *update = NULL; _cleanup_free_ char *update = NULL;
const sd_bus_error *e; const sd_bus_error *e;
sd_bus_error error = {}; sd_bus_error error = {};
const char *lnk = NULL; const char *lnk = NULL;
char *current; char *current;
int r; int r;

View File

@@ -595,7 +595,7 @@ testcase_list_users_sessions_seats() {
systemd-run --quiet --service-type=notify --unit=test-linger-signal-wait --pty \ systemd-run --quiet --service-type=notify --unit=test-linger-signal-wait --pty \
-p Environment=SYSTEMD_LOG_LEVEL=debug \ -p Environment=SYSTEMD_LOG_LEVEL=debug \
-p ExecStartPost="loginctl enable-linger logind-test-user" \ -p ExecStartPost="loginctl enable-linger logind-test-user" \
busctl --timeout=30 wait "/org/freedesktop/login1/user/_$(id -ru logind-test-user)" org.freedesktop.DBus.Properties PropertiesChanged | grep -qF '"Linger" b true' busctl --timeout=30 wait "/org/freedesktop/login1/user/_$(id -ru logind-test-user)" org.freedesktop.DBus.Properties PropertiesChanged | grep -qF '"Linger" b true'
assert_eq "$(loginctl list-users --no-legend | awk '$2 == "logind-test-user" { print $3 }')" yes assert_eq "$(loginctl list-users --no-legend | awk '$2 == "logind-test-user" { print $3 }')" yes
for s in $(loginctl list-sessions --no-legend | grep tty | awk '$3 == "logind-test-user" { print $1 }'); do for s in $(loginctl list-sessions --no-legend | grep tty | awk '$3 == "logind-test-user" { print $1 }'); do
@@ -797,7 +797,7 @@ testcase_restart() {
for c in $classes; do for c in $classes; do
unit="user-sleeper-$c.service" unit="user-sleeper-$c.service"
systemd-run --service-type=notify run0 --setenv XDG_SESSION_CLASS="$c" -u logind-test-user --unit="$unit" sleep infinity systemd-run --service-type=notify run0 --setenv XDG_SESSION_CLASS="$c" -u logind-test-user --unit="$unit" sleep infinity
done done
systemctl restart systemd-logind systemctl restart systemd-logind

View File

@@ -146,7 +146,7 @@ run_and_check_services() {
# jq --slurp --raw-output \ # jq --slurp --raw-output \
# ".[].browser_service_data[] | select(.updateFlag == true and .type == \"$service_type\" and .family == 10).name" "$out_file" | sort | tee "$tmp_file" # ".[].browser_service_data[] | select(.updateFlag == true and .type == \"$service_type\" and .family == 10).name" "$out_file" | sort | tee "$tmp_file"
grep -o '"name":"[^"]*"' "$out_file" | sed 's/"name":"//;s/"//g' | sort | tee "$tmp_file" grep -o '"name":"[^"]*"' "$out_file" | sed 's/"name":"//;s/"//g' | sort | tee "$tmp_file"
# ...and compare them with what we expect # ...and compare them with what we expect
if "$check_func" "$service_id" "$tmp_file"; then if "$check_func" "$service_id" "$tmp_file"; then
return 0 return 0
fi fi