Compare commits
No commits in common. "1b87e27999d3c53469587c2faee66376d03391fb" and "50f5e2e2817d3435a1d6c0ce0d434efe5dcc2748" have entirely different histories.
1b87e27999
...
50f5e2e281
|
@ -291,7 +291,9 @@ manpages = [
|
|||
'sd_bus_message_get_interface',
|
||||
'sd_bus_message_get_member',
|
||||
'sd_bus_message_get_path',
|
||||
'sd_bus_message_get_priority',
|
||||
'sd_bus_message_get_sender',
|
||||
'sd_bus_message_set_priority',
|
||||
'sd_bus_message_set_sender'],
|
||||
''],
|
||||
['sd_bus_message_set_expect_reply',
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
<citerefentry><refentrytitle>sd_bus_message_dump</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_get_cookie</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_get_priority</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_get_sender</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_get_signature</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_get_type</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
|
@ -83,6 +84,7 @@
|
|||
<citerefentry><refentrytitle>sd_bus_message_rewind</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_seal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_set_destination</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_set_priority</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_set_sender</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_set_expect_reply</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sd_bus_message_skip</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
<refname>sd_bus_message_get_path</refname>
|
||||
<refname>sd_bus_message_get_interface</refname>
|
||||
<refname>sd_bus_message_get_member</refname>
|
||||
<refname>sd_bus_message_set_priority</refname>
|
||||
<refname>sd_bus_message_get_priority</refname>
|
||||
<refname>sd_bus_message_set_sender</refname>
|
||||
<refname>sd_bus_message_get_sender</refname>
|
||||
|
||||
|
@ -55,6 +57,18 @@
|
|||
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
||||
</funcprototype>
|
||||
|
||||
<funcprototype>
|
||||
<funcdef>int <function>sd_bus_message_set_priority</function></funcdef>
|
||||
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
||||
<paramdef>int64_t <parameter>priority</parameter></paramdef>
|
||||
</funcprototype>
|
||||
|
||||
<funcprototype>
|
||||
<funcdef>int <function>sd_bus_message_get_priority</function></funcdef>
|
||||
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
||||
<paramdef>int64_t *<parameter>priority</parameter></paramdef>
|
||||
</funcprototype>
|
||||
|
||||
<funcprototype>
|
||||
<funcdef>int <function>sd_bus_message_set_sender</function></funcdef>
|
||||
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
||||
|
@ -86,6 +100,10 @@
|
|||
<citerefentry><refentrytitle>sd_bus_message_set_destination</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||
for more discussion of those values.</para>
|
||||
|
||||
<para><function>sd_bus_message_set_priority()</function> and
|
||||
<function>sd_bus_message_get_priority()</function> modify and query a message's priority
|
||||
respectively. sd-bus currently doesn't make use of a message's priority.</para>
|
||||
|
||||
<para><function>sd_bus_message_set_sender()</function> sets the sender service name for the specified bus message
|
||||
object. The specified name must be a valid unique or well-known service name. This function is useful only for
|
||||
messages to send on direct connections as for connections to bus brokers the broker will fill in the destination
|
||||
|
@ -121,8 +139,9 @@
|
|||
<varlistentry>
|
||||
<term><constant>-EPERM</constant></term>
|
||||
|
||||
<listitem><para>For <function>sd_bus_message_set_destination()</function> and
|
||||
<function>sd_bus_message_set_sender()</function>, the message is already sealed.</para>
|
||||
<listitem><para>For <function>sd_bus_message_set_destination()</function>,
|
||||
<function>sd_bus_message_set_sender()</function> and
|
||||
<function>sd_bus_message_set_priority()</function>, the message is already sealed.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ enable getty@.service
|
|||
enable systemd-timesyncd.service
|
||||
enable systemd-networkd.service
|
||||
enable systemd-resolved.service
|
||||
enable systemd-repart.service
|
||||
enable systemd-homed.service
|
||||
enable systemd-userdbd.socket
|
||||
|
||||
|
|
|
@ -107,13 +107,11 @@ int capability_ambient_set_apply(uint64_t set, bool also_inherit) {
|
|||
unsigned long i;
|
||||
int r;
|
||||
|
||||
/* Add the capabilities to the ambient set (an possibly also the inheritable set) */
|
||||
|
||||
/* Check that we can use PR_CAP_AMBIENT or quit early. */
|
||||
if (!ambient_capabilities_supported())
|
||||
return (set & all_capabilities()) == 0 ?
|
||||
0 : -EOPNOTSUPP; /* if actually no ambient caps are to be set, be silent,
|
||||
* otherwise fail recognizably */
|
||||
return 0;
|
||||
|
||||
/* Add the capabilities to the ambient set. */
|
||||
|
||||
if (also_inherit) {
|
||||
caps = cap_get_proc();
|
||||
|
|
|
@ -1833,7 +1833,7 @@ static int dispatch_wqueue(sd_bus *bus) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int bus_read_message(sd_bus *bus) {
|
||||
static int bus_read_message(sd_bus *bus, bool hint_priority, int64_t priority) {
|
||||
assert(bus);
|
||||
|
||||
return bus_socket_read_message(bus);
|
||||
|
@ -1860,13 +1860,17 @@ static void rqueue_drop_one(sd_bus *bus, size_t i) {
|
|||
bus->rqueue_size--;
|
||||
}
|
||||
|
||||
static int dispatch_rqueue(sd_bus *bus, sd_bus_message **m) {
|
||||
static int dispatch_rqueue(sd_bus *bus, bool hint_priority, int64_t priority, sd_bus_message **m) {
|
||||
int r, ret = 0;
|
||||
|
||||
assert(bus);
|
||||
assert(m);
|
||||
assert(IN_SET(bus->state, BUS_RUNNING, BUS_HELLO));
|
||||
|
||||
/* Note that the priority logic is only available on kdbus,
|
||||
* where the rqueue is unused. We check the rqueue here
|
||||
* anyway, because it's simple... */
|
||||
|
||||
for (;;) {
|
||||
if (bus->rqueue_size > 0) {
|
||||
/* Dispatch a queued message */
|
||||
|
@ -1876,7 +1880,7 @@ static int dispatch_rqueue(sd_bus *bus, sd_bus_message **m) {
|
|||
}
|
||||
|
||||
/* Try to read a new message */
|
||||
r = bus_read_message(bus);
|
||||
r = bus_read_message(bus, hint_priority, priority);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0) {
|
||||
|
@ -2233,7 +2237,7 @@ _public_ int sd_bus_call(
|
|||
i++;
|
||||
}
|
||||
|
||||
r = bus_read_message(bus);
|
||||
r = bus_read_message(bus, false, 0);
|
||||
if (r < 0) {
|
||||
if (ERRNO_IS_DISCONNECT(r)) {
|
||||
bus_enter_closing(bus);
|
||||
|
@ -2772,7 +2776,7 @@ static int dispatch_track(sd_bus *bus) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int process_running(sd_bus *bus, sd_bus_message **ret) {
|
||||
static int process_running(sd_bus *bus, bool hint_priority, int64_t priority, sd_bus_message **ret) {
|
||||
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
|
||||
int r;
|
||||
|
||||
|
@ -2791,7 +2795,7 @@ static int process_running(sd_bus *bus, sd_bus_message **ret) {
|
|||
if (r != 0)
|
||||
goto null_message;
|
||||
|
||||
r = dispatch_rqueue(bus, &m);
|
||||
r = dispatch_rqueue(bus, hint_priority, priority, &m);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (!m)
|
||||
|
@ -2977,7 +2981,7 @@ finish:
|
|||
return r;
|
||||
}
|
||||
|
||||
static int bus_process_internal(sd_bus *bus, sd_bus_message **ret) {
|
||||
static int bus_process_internal(sd_bus *bus, bool hint_priority, int64_t priority, sd_bus_message **ret) {
|
||||
int r;
|
||||
|
||||
/* Returns 0 when we didn't do anything. This should cause the
|
||||
|
@ -3017,7 +3021,7 @@ static int bus_process_internal(sd_bus *bus, sd_bus_message **ret) {
|
|||
|
||||
case BUS_RUNNING:
|
||||
case BUS_HELLO:
|
||||
r = process_running(bus, ret);
|
||||
r = process_running(bus, hint_priority, priority, ret);
|
||||
if (r >= 0)
|
||||
return r;
|
||||
|
||||
|
@ -3044,11 +3048,11 @@ static int bus_process_internal(sd_bus *bus, sd_bus_message **ret) {
|
|||
}
|
||||
|
||||
_public_ int sd_bus_process(sd_bus *bus, sd_bus_message **ret) {
|
||||
return bus_process_internal(bus, ret);
|
||||
return bus_process_internal(bus, false, 0, ret);
|
||||
}
|
||||
|
||||
_public_ int sd_bus_process_priority(sd_bus *bus, int64_t priority, sd_bus_message **ret) {
|
||||
return bus_process_internal(bus, ret);
|
||||
return bus_process_internal(bus, true, priority, ret);
|
||||
}
|
||||
|
||||
static int bus_poll(sd_bus *bus, bool need_more, uint64_t timeout_usec) {
|
||||
|
|
|
@ -37,8 +37,6 @@ void etc_hosts_free(EtcHosts *hosts) {
|
|||
void manager_etc_hosts_flush(Manager *m) {
|
||||
etc_hosts_free(&m->etc_hosts);
|
||||
m->etc_hosts_mtime = USEC_INFINITY;
|
||||
m->etc_hosts_ino = 0;
|
||||
m->etc_hosts_dev = 0;
|
||||
}
|
||||
|
||||
static int parse_line(EtcHosts *hosts, unsigned nr, const char *line) {
|
||||
|
@ -226,9 +224,8 @@ static int manager_etc_hosts_read(Manager *m) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Did the mtime or ino/dev change? If not, there's no point in re-reading the file. */
|
||||
if (timespec_load(&st.st_mtim) == m->etc_hosts_mtime &&
|
||||
st.st_ino == m->etc_hosts_ino && st.st_dev == m->etc_hosts_dev)
|
||||
/* Did the mtime change? If not, there's no point in re-reading the file. */
|
||||
if (timespec_load(&st.st_mtim) == m->etc_hosts_mtime)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -252,8 +249,6 @@ static int manager_etc_hosts_read(Manager *m) {
|
|||
return r;
|
||||
|
||||
m->etc_hosts_mtime = timespec_load(&st.st_mtim);
|
||||
m->etc_hosts_ino = st.st_ino;
|
||||
m->etc_hosts_dev = st.st_dev;
|
||||
m->etc_hosts_last = ts;
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -591,8 +591,6 @@ int manager_new(Manager **ret) {
|
|||
.need_builtin_fallbacks = true,
|
||||
.etc_hosts_last = USEC_INFINITY,
|
||||
.etc_hosts_mtime = USEC_INFINITY,
|
||||
.etc_hosts_ino = 0,
|
||||
.etc_hosts_dev = 0,
|
||||
.read_etc_hosts = true,
|
||||
};
|
||||
|
||||
|
|
|
@ -127,8 +127,6 @@ struct Manager {
|
|||
/* Data from /etc/hosts */
|
||||
EtcHosts etc_hosts;
|
||||
usec_t etc_hosts_last, etc_hosts_mtime;
|
||||
ino_t etc_hosts_ino;
|
||||
dev_t etc_hosts_dev;
|
||||
bool read_etc_hosts;
|
||||
|
||||
/* Local DNS stub on 127.0.0.53:53 */
|
||||
|
|
|
@ -1188,8 +1188,6 @@ static int decrypt_partition(
|
|||
if (r < 0)
|
||||
return log_debug_errno(r, "Failed to initialize dm-crypt: %m");
|
||||
|
||||
crypt_set_log_callback(cd, cryptsetup_log_glue, NULL);
|
||||
|
||||
r = crypt_load(cd, CRYPT_LUKS, NULL);
|
||||
if (r < 0)
|
||||
return log_debug_errno(r, "Failed to load LUKS metadata: %m");
|
||||
|
@ -1248,8 +1246,6 @@ static int verity_partition(
|
|||
if (r < 0)
|
||||
return r;
|
||||
|
||||
crypt_set_log_callback(cd, cryptsetup_log_glue, NULL);
|
||||
|
||||
r = crypt_load(cd, CRYPT_VERITY, NULL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
|
|
@ -204,7 +204,7 @@ int sd_bus_get_fd(sd_bus *bus);
|
|||
int sd_bus_get_events(sd_bus *bus);
|
||||
int sd_bus_get_timeout(sd_bus *bus, uint64_t *timeout_usec);
|
||||
int sd_bus_process(sd_bus *bus, sd_bus_message **r);
|
||||
int sd_bus_process_priority(sd_bus *bus, int64_t max_priority, sd_bus_message **r) _sd_deprecated_; /* deprecated */
|
||||
int sd_bus_process_priority(sd_bus *bus, int64_t max_priority, sd_bus_message **r);
|
||||
int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec);
|
||||
int sd_bus_flush(sd_bus *bus);
|
||||
int sd_bus_enqueue_for_read(sd_bus *bus, sd_bus_message *m);
|
||||
|
@ -272,7 +272,7 @@ int sd_bus_message_seal(sd_bus_message *m, uint64_t cookie, uint64_t timeout_use
|
|||
int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type);
|
||||
int sd_bus_message_get_cookie(sd_bus_message *m, uint64_t *cookie);
|
||||
int sd_bus_message_get_reply_cookie(sd_bus_message *m, uint64_t *cookie);
|
||||
int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority) _sd_deprecated_; /* deprecated */
|
||||
int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority);
|
||||
|
||||
int sd_bus_message_get_expect_reply(sd_bus_message *m);
|
||||
int sd_bus_message_get_auto_start(sd_bus_message *m);
|
||||
|
@ -306,7 +306,7 @@ int sd_bus_message_set_allow_interactive_authorization(sd_bus_message *m, int b)
|
|||
|
||||
int sd_bus_message_set_destination(sd_bus_message *m, const char *destination);
|
||||
int sd_bus_message_set_sender(sd_bus_message *m, const char *sender);
|
||||
int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority) _sd_deprecated_; /* deprecated */
|
||||
int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority);
|
||||
|
||||
int sd_bus_message_append(sd_bus_message *m, const char *types, ...);
|
||||
int sd_bus_message_appendv(sd_bus_message *m, const char *types, va_list ap);
|
||||
|
|
|
@ -226,8 +226,7 @@ in_units = [
|
|||
'multi-user.target.wants/'],
|
||||
['systemd-vconsole-setup.service', 'ENABLE_VCONSOLE'],
|
||||
['systemd-volatile-root.service', ''],
|
||||
['systemd-repart.service', 'ENABLE_REPART',
|
||||
'sysinit.target.wants/ initrd-root-fs.target.wants/'],
|
||||
['systemd-repart.service', 'ENABLE_REPART'],
|
||||
['user-runtime-dir@.service', ''],
|
||||
['user@.service', ''],
|
||||
]
|
||||
|
|
|
@ -15,10 +15,6 @@ Conflicts=shutdown.target
|
|||
After=sysroot.mount
|
||||
Before=initrd-root-fs.target shutdown.target
|
||||
ConditionVirtualization=!container
|
||||
ConditionDirectoryNotEmpty=|/usr/lib/repart.d
|
||||
ConditionDirectoryNotEmpty=|/usr/local/lib/repart.d
|
||||
ConditionDirectoryNotEmpty=|/etc/repart.d
|
||||
ConditionDirectoryNotEmpty=|/run/repart.d
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
@ -27,3 +23,7 @@ ExecStart=@rootbindir@/systemd-repart --dry-run=no
|
|||
|
||||
# The tool returns 77 if there's no existing GPT partition table
|
||||
SuccessExitStatus=77
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
WantedBy=initrd-root-fs.target
|
||||
|
|
Loading…
Reference in New Issue