Merge pull request #33517 from keszybz/a-few-unrelated-cleanups

A few unrelated cleanups
This commit is contained in:
Luca Boccassi
2024-06-28 19:06:31 +02:00
committed by GitHub
5 changed files with 44 additions and 43 deletions
+9 -9
View File
@@ -13,16 +13,16 @@ if [[ -d "$PKG_SUBDIR/.git" ]] && [[ "$(git -C "$PKG_SUBDIR" rev-parse HEAD)" ==
exit 0
fi
# The repository on Salsa has the full upstream sources, so it's a waste of space to
# redownload and duplicate everything, so do a sparse checkout as we only need the
# packaging directory anyway
if [[ -n "${GIT_SUBDIR:-}" ]]; then
sparse=(--no-checkout --filter=tree:0)
else
sparse=()
fi
if [[ ! -e "$PKG_SUBDIR" ]] || [[ -z "$(ls --almost-all "$PKG_SUBDIR")" ]]; then
# The repository on Salsa has the full upstream sources, so it's a waste of
# space to redownload and duplicate everything, so do a sparse checkout as
# we only need the packaging directory anyway.
if [[ -n "${GIT_SUBDIR:-}" ]]; then
sparse=(--no-checkout --filter=tree:0)
else
sparse=()
fi
git clone "$GIT_URL" --branch "$GIT_BRANCH" "${sparse[@]}" "$PKG_SUBDIR"
if [[ -n "${GIT_SUBDIR:-}" ]]; then
# --no-cone is needed to check out only one top-level directory
+4 -4
View File
@@ -39,7 +39,7 @@ _public_ int sd_bus_emit_signal_tov(
if (r < 0)
return r;
if (!isempty(types)) {
if (types) {
r = sd_bus_message_appendv(m, types, ap);
if (r < 0)
return r;
@@ -118,7 +118,7 @@ _public_ int sd_bus_call_method_asyncv(
if (r < 0)
return r;
if (!isempty(types)) {
if (types) {
r = sd_bus_message_appendv(m, types, ap);
if (r < 0)
return r;
@@ -174,7 +174,7 @@ _public_ int sd_bus_call_methodv(
if (r < 0)
goto fail;
if (!isempty(types)) {
if (types) {
r = sd_bus_message_appendv(m, types, ap);
if (r < 0)
goto fail;
@@ -229,7 +229,7 @@ _public_ int sd_bus_reply_method_returnv(
if (r < 0)
return r;
if (!isempty(types)) {
if (types) {
r = sd_bus_message_appendv(m, types, ap);
if (r < 0)
return r;
+26 -26
View File
@@ -69,7 +69,7 @@ struct node {
struct node_callback {
struct node *node;
bool is_fallback:1;
bool is_fallback;
unsigned last_iteration;
sd_bus_message_handler_t callback;
@@ -96,7 +96,7 @@ struct node_object_manager {
struct node_vtable {
struct node *node;
bool is_fallback:1;
bool is_fallback;
unsigned last_iteration;
char *interface;
@@ -190,33 +190,33 @@ struct sd_bus {
int message_version;
int message_endian;
bool can_fds:1;
bool bus_client:1;
bool ucred_valid:1;
bool is_server:1;
bool anonymous_auth:1;
bool prefer_readv:1;
bool prefer_writev:1;
bool match_callbacks_modified:1;
bool filter_callbacks_modified:1;
bool nodes_modified:1;
bool trusted:1;
bool manual_peer_interface:1;
bool allow_interactive_authorization:1;
bool exit_on_disconnect:1;
bool exited:1;
bool exit_triggered:1;
bool is_local:1;
bool watch_bind:1;
bool is_monitor:1;
bool accept_fd:1;
bool attach_timestamp:1;
bool connected_signal:1;
bool close_on_exit:1;
bool can_fds;
bool bus_client;
bool ucred_valid;
bool is_server;
bool anonymous_auth;
bool prefer_readv;
bool prefer_writev;
bool match_callbacks_modified;
bool filter_callbacks_modified;
bool nodes_modified;
bool trusted;
bool manual_peer_interface;
bool allow_interactive_authorization;
bool exit_on_disconnect;
bool exited;
bool exit_triggered;
bool is_local;
bool watch_bind;
bool is_monitor;
bool accept_fd;
bool attach_timestamp;
bool connected_signal;
bool close_on_exit;
RuntimeScope runtime_scope;
signed int use_memfd:2;
int use_memfd;
void *rbuffer;
size_t rbuffer_size;
+1 -1
View File
@@ -3673,7 +3673,7 @@ static int io_callback(sd_event_source *s, int fd, uint32_t revents, void *userd
sd_bus *bus = ASSERT_PTR(userdata);
int r;
/* Note that this is called both on input_fd, output_fd as well as inotify_fd events */
/* Note that this is called both on input_fd, output_fd, as well as inotify_fd events */
r = sd_bus_process(bus, NULL);
if (r < 0) {
+4 -3
View File
@@ -423,7 +423,7 @@ EOF
--json=pretty \
"$imgs/zzz")
diff -u <(echo "$output") - <<EOF
diff -u - <<EOF <(echo "$output")
[
{
"type" : "swap",
@@ -484,7 +484,7 @@ EOF
--json=pretty \
"$imgs/zzz")
diff -u <(echo "$output") - <<EOF
diff -u - <<EOF <(echo "$output")
[
{
"type" : "swap",
@@ -1198,7 +1198,8 @@ EOF
--json=pretty \
"$imgs/zzz")
diff -u <(echo "$output1" | grep -E "(offset|raw_size|raw_padding)") <(echo "$output2" | grep -E "(offset|raw_size|raw_padding)")
diff -u <(echo "$output1" | grep -E "(offset|raw_size|raw_padding)") \
<(echo "$output2" | grep -E "(offset|raw_size|raw_padding)")
}
test_sector() {