Compare commits
No commits in common. "f12d19b30447a771ba6dd551ac05a4ba6de2a976" and "8d0726fcd7b72f2a6f75dd731cbf7c8d4df107ef" have entirely different histories.
f12d19b304
...
8d0726fcd7
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_bus_get_fd</refname>
|
<refname>sd_bus_get_fd</refname>
|
||||||
<refname>sd_bus_set_fd</refname>
|
|
||||||
<refname>sd_bus_get_events</refname>
|
<refname>sd_bus_get_events</refname>
|
||||||
<refname>sd_bus_get_timeout</refname>
|
<refname>sd_bus_get_timeout</refname>
|
||||||
|
|
||||||
|
@ -38,13 +37,6 @@
|
||||||
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
|
||||||
<funcdef>int <function>sd_bus_set_fd</function></funcdef>
|
|
||||||
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
|
||||||
<paramdef>int <parameter>input_fd</parameter></paramdef>
|
|
||||||
<paramdef>int <parameter>output_fd</parameter></paramdef>
|
|
||||||
</funcprototype>
|
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_bus_get_events</function></funcdef>
|
<funcdef>int <function>sd_bus_get_events</function></funcdef>
|
||||||
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
||||||
|
@ -65,13 +57,8 @@
|
||||||
object. This descriptor can be used with <citerefentry
|
object. This descriptor can be used with <citerefentry
|
||||||
project='man-pages'><refentrytitle>poll</refentrytitle><manvolnum>3</manvolnum></citerefentry> or a similar
|
project='man-pages'><refentrytitle>poll</refentrytitle><manvolnum>3</manvolnum></citerefentry> or a similar
|
||||||
function to wait for I/O events on the specified bus connection object. If the bus object was configured with the
|
function to wait for I/O events on the specified bus connection object. If the bus object was configured with the
|
||||||
<function>sd_bus_set_fd()</function> function, then the <parameter>input_fd</parameter> file descriptor used in
|
<citerefentry><refentrytitle>sd_bus_set_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry> function, then
|
||||||
that call is returned.</para>
|
the <parameter>input_fd</parameter> file descriptor used in that call is returned.</para>
|
||||||
|
|
||||||
<para><function>sd_bus_set_fd()</function> sets the file descriptors used to communicate from a message bus
|
|
||||||
object. Both <parameter>input_fd</parameter> and <parameter>output_fd</parameter> must be valid file descriptors.
|
|
||||||
The same file descriptor may be used as both the input and the output file descriptor. This function must be called
|
|
||||||
before the bus is started.</para>
|
|
||||||
|
|
||||||
<para><function>sd_bus_get_events()</function> returns the I/O events to wait for, suitable for passing to
|
<para><function>sd_bus_get_events()</function> returns the I/O events to wait for, suitable for passing to
|
||||||
<function>poll()</function> or a similar call. Returns a combination of <constant>POLLIN</constant>,
|
<function>poll()</function> or a similar call. Returns a combination of <constant>POLLIN</constant>,
|
||||||
|
@ -109,17 +96,14 @@
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On success, <function>sd_bus_get_fd()</function> returns the file descriptor used for communication. On failure,
|
<para><function>sd_bus_get_fd()</function> returns the file descriptor used for communication, or a negative
|
||||||
it returns a negative errno-style error code.</para>
|
<varname>errno</varname>-style error code on error.</para>
|
||||||
|
|
||||||
<para>On success, <function>sd_bus_set_fd()</function> returns a non-negative integer. On failure, it returns a
|
<para><function>sd_bus_get_events()</function> returns the I/O event mask to use for I/O event watching, or a
|
||||||
negative errno-style error code.</para>
|
negative <varname>errno</varname>-style error code on error.</para>
|
||||||
|
|
||||||
<para>On success, <function>sd_bus_get_events()</function> returns the I/O event mask to use for I/O event watching.
|
<para><function>sd_bus_get_timeout()</function> returns zero or positive on success, or a negative
|
||||||
On failure, it returns a negative errno-style error code.</para>
|
<varname>errno</varname>-style error code on error.</para>
|
||||||
|
|
||||||
<para>On success, <function>sd_bus_get_timeout()</function> returns a non-negative integer. On failure, it returns a
|
|
||||||
negative errno-style error code.</para>
|
|
||||||
|
|
||||||
<refsect2>
|
<refsect2>
|
||||||
<title>Errors</title>
|
<title>Errors</title>
|
||||||
|
@ -153,19 +137,6 @@
|
||||||
<function>sd_bus_set_fd()</function>, which <function>sd_bus_get_fd()</function> cannot
|
<function>sd_bus_set_fd()</function>, which <function>sd_bus_get_fd()</function> cannot
|
||||||
return.</para></listitem>
|
return.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><constant>-EBADF</constant></term>
|
|
||||||
|
|
||||||
<listitem><para>An invalid file descriptor was passed to <function>sd_bus_set_fd()</function>.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><constant>-ENOPKG</constant></term>
|
|
||||||
|
|
||||||
<listitem><para>The bus cannot be resolved.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
@ -178,6 +149,7 @@
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
|
<citerefentry><refentrytitle>sd_bus_set_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_bus_process</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_bus_process</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_bus_attach_event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_bus_attach_event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_bus_wait</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_bus_wait</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
|
|
|
@ -36,7 +36,7 @@ static int parse_argv(
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
const char *v;
|
const char *v;
|
||||||
|
|
||||||
if ((v = startswith(argv[i], "suspend="))) {
|
if ((v = startswith(argv[1], "suspend="))) {
|
||||||
int k;
|
int k;
|
||||||
|
|
||||||
k = parse_boolean(v);
|
k = parse_boolean(v);
|
||||||
|
|
|
@ -543,7 +543,9 @@ static const NLType rtnl_link_types[] = {
|
||||||
[IFLA_IFNAME] = { .type = NETLINK_TYPE_STRING, .size = IFNAMSIZ - 1 },
|
[IFLA_IFNAME] = { .type = NETLINK_TYPE_STRING, .size = IFNAMSIZ - 1 },
|
||||||
[IFLA_MTU] = { .type = NETLINK_TYPE_U32 },
|
[IFLA_MTU] = { .type = NETLINK_TYPE_U32 },
|
||||||
[IFLA_LINK] = { .type = NETLINK_TYPE_U32 },
|
[IFLA_LINK] = { .type = NETLINK_TYPE_U32 },
|
||||||
[IFLA_QDISC] = { .type = NETLINK_TYPE_STRING },
|
/*
|
||||||
|
[IFLA_QDISC],
|
||||||
|
*/
|
||||||
[IFLA_STATS] = { .size = sizeof(struct rtnl_link_stats) },
|
[IFLA_STATS] = { .size = sizeof(struct rtnl_link_stats) },
|
||||||
/*
|
/*
|
||||||
[IFLA_COST],
|
[IFLA_COST],
|
||||||
|
|
|
@ -125,7 +125,6 @@ typedef struct LinkInfo {
|
||||||
uint32_t max_mtu;
|
uint32_t max_mtu;
|
||||||
uint32_t tx_queues;
|
uint32_t tx_queues;
|
||||||
uint32_t rx_queues;
|
uint32_t rx_queues;
|
||||||
char *qdisc;
|
|
||||||
char **alternative_names;
|
char **alternative_names;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
|
@ -180,7 +179,6 @@ static const LinkInfo* link_info_array_free(LinkInfo *array) {
|
||||||
for (unsigned i = 0; array && array[i].needs_freeing; i++) {
|
for (unsigned i = 0; array && array[i].needs_freeing; i++) {
|
||||||
sd_device_unref(array[i].sd_device);
|
sd_device_unref(array[i].sd_device);
|
||||||
free(array[i].ssid);
|
free(array[i].ssid);
|
||||||
free(array[i].qdisc);
|
|
||||||
strv_free(array[i].alternative_names);
|
strv_free(array[i].alternative_names);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +249,7 @@ static int decode_netdev(sd_netlink_message *m, LinkInfo *info) {
|
||||||
|
|
||||||
static int decode_link(sd_netlink_message *m, LinkInfo *info, char **patterns, bool matched_patterns[]) {
|
static int decode_link(sd_netlink_message *m, LinkInfo *info, char **patterns, bool matched_patterns[]) {
|
||||||
_cleanup_strv_free_ char **altnames = NULL;
|
_cleanup_strv_free_ char **altnames = NULL;
|
||||||
const char *name, *qdisc;
|
const char *name;
|
||||||
int ifindex, r;
|
int ifindex, r;
|
||||||
uint16_t type;
|
uint16_t type;
|
||||||
|
|
||||||
|
@ -335,13 +333,6 @@ static int decode_link(sd_netlink_message *m, LinkInfo *info, char **patterns, b
|
||||||
else if (sd_netlink_message_read(m, IFLA_STATS, sizeof info->stats, &info->stats) >= 0)
|
else if (sd_netlink_message_read(m, IFLA_STATS, sizeof info->stats, &info->stats) >= 0)
|
||||||
info->has_stats = true;
|
info->has_stats = true;
|
||||||
|
|
||||||
r = sd_netlink_message_read_string(m, IFLA_QDISC, &qdisc);
|
|
||||||
if (r >= 0) {
|
|
||||||
info->qdisc = strdup(qdisc);
|
|
||||||
if (!info->qdisc)
|
|
||||||
return log_oom();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* fill kind info */
|
/* fill kind info */
|
||||||
(void) decode_netdev(m, info);
|
(void) decode_netdev(m, info);
|
||||||
|
|
||||||
|
@ -1345,15 +1336,6 @@ static int link_status_one(
|
||||||
return table_log_add_error(r);
|
return table_log_add_error(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->qdisc) {
|
|
||||||
r = table_add_many(table,
|
|
||||||
TABLE_EMPTY,
|
|
||||||
TABLE_STRING, "QDisc:",
|
|
||||||
TABLE_STRING, info->qdisc);
|
|
||||||
if (r < 0)
|
|
||||||
return table_log_add_error(r);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (streq_ptr(info->netdev_kind, "bridge")) {
|
if (streq_ptr(info->netdev_kind, "bridge")) {
|
||||||
r = table_add_many(table,
|
r = table_add_many(table,
|
||||||
TABLE_EMPTY,
|
TABLE_EMPTY,
|
||||||
|
|
|
@ -6,7 +6,6 @@ systemd-analyze log-level debug
|
||||||
systemd-analyze log-target console
|
systemd-analyze log-target console
|
||||||
|
|
||||||
systemctl start issue_14566_test
|
systemctl start issue_14566_test
|
||||||
sleep 1
|
|
||||||
systemctl status issue_14566_test
|
systemctl status issue_14566_test
|
||||||
|
|
||||||
leaked_pid=$(cat /leakedtestpid)
|
leaked_pid=$(cat /leakedtestpid)
|
||||||
|
|
Loading…
Reference in New Issue