errno-style error code.</para>
</refsect1>
-
<refsect1>
<title>Errors</title>
assert_not_reached("Unexpected type?");
}
-
return d->formatted;
}
.compare = string_compare_func
};
-
void path_hash_func(const void *p, struct siphash *state) {
const char *q = p;
size_t n;
return NULL;
}
-
int mount_propagation_flags_from_string(const char *name, unsigned long *ret) {
if (isempty(name))
#endif
x = 0;
-
x ^= (unsigned) now(CLOCK_REALTIME);
x ^= (unsigned) gettid();
if (!mac_selinux_use())
return NULL;
-
freecon(label);
#endif
return -EOPNOTSUPP;
}
-
*ret = p;
return 0;
}
};
int r;
-
/* Similar to flush_fd() but flushes all incoming connection by accepting them and immediately closing them. */
for (;;) {
u->in_cgroup_realize_queue = false;
}
-
/* Check if necessary controllers and attributes for a unit are in place.
*
* If so, do nothing.
sd_bus_message_unref(m);
}
-
return NULL;
}
return 0;
}
-
_public_ int sd_bus_creds_get_fsuid(sd_bus_creds *c, uid_t *fsuid) {
assert_return(c, -EINVAL);
assert_return(fsuid, -EINVAL);
components[n_components].value_u8 = u;
n_components++;
-
if (q[quoted] == 0)
break;
return 0;
}
-
static int message_peek_body(
sd_bus_message *m,
size_t *rindex,
break;
-
case BUS_MESSAGE_HEADER_SIGNATURE: {
const char *s;
char *c;
return -EINVAL;
}
-
int signature_element_length(const char *s, size_t *l) {
return signature_element_length_internal(s, true, 0, 0, l);
}
key.interface = slot->node_vtable.interface;
key.member = v->x.method.member;
-
x = hashmap_remove(slot->bus->vtable_properties, &key);
break;
}}
return bus_default(sd_bus_open_system, &default_system_bus, ret);
}
-
_public_ int sd_bus_default_user(sd_bus **ret) {
#if 0 /// elogind does not support user buses
return bus_default(sd_bus_open_user, &default_user_bus, ret);
if (s->desktop) {
_cleanup_free_ char *escaped;
-
escaped = cescape(s->desktop);
if (!escaped) {
r = -ENOMEM;
return write_utmp_wtmp(&store, &store_wtmp);
}
-
int utmp_put_runlevel(int runlevel, int previous) {
struct utmpx store = {};
int r;
gather_stdout_three,
};
-
static void test_stdout_gathering(void) {
char template[] = "/tmp/test-exec-util.XXXXXXX";
const char *dirs[] = {template, NULL};
Copyright 2014 Ronny Chevalier
***/
-
#include "locale-util.h"
#include "macro.h"
#include "strv.h"
assert_se(parse_nice("19", &n) >= 0 && n == 19);
assert_se(parse_nice("+19", &n) >= 0 && n == 19);
-
assert_se(parse_nice("", &n) == -EINVAL);
assert_se(parse_nice("-", &n) == -EINVAL);
assert_se(parse_nice("+", &n) == -EINVAL);
assert_se(is_symlink(name_link) == 1);
assert_se(is_symlink("/a/file/which/does/not/exist/i/guess") < 0);
-
unlink(name);
unlink(name_link);
}
assert_se(streq(zero, ""));
}
-
static void test_strappend(void) {
_cleanup_free_ char *t1, *t2, *t3, *t4;
--- /dev/null
+#!/bin/sh
+# SPDX-License-Identifier: LGPL-2.1+
+
+case "$1" in
+
+ recdiff)
+ if [ "$2" = "" ] ; then
+ DIR="$PWD/.."
+ else
+ DIR="$2"
+ fi
+
+ find $DIR -type f \( -name '*.c' -o -name '*.xml' \) -exec $0 diff \{\} \;
+ ;;
+
+ recpatch)
+ if [ "$2" = "" ] ; then
+ DIR="$PWD/.."
+ else
+ DIR="$2"
+ fi
+
+ find $DIR -type f \( -name '*.c' -o -name '*.xml' \) -exec $0 patch \{\} \;
+ ;;
+
+ diff)
+ T=`mktemp`
+ sed '/^$/N;/^\n$/D' < "$2" > "$T"
+ diff -u "$2" "$T"
+ rm -f "$T"
+ ;;
+
+ patch)
+ sed -i '/^$/N;/^\n$/D' "$2"
+ ;;
+
+ *)
+ echo "Expected recdiff|recpatch|diff|patch as verb." >&2
+ ;;
+esac