mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-15 11:07:24 +07:00
dbus: export ControlGroupPersistent field on the bus again
This commit is contained in:
parent
c7eb4b85c3
commit
aa001cd699
@ -533,6 +533,22 @@ int bus_property_append_bool(DBusMessageIter *i, const char *property, void *dat
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bus_property_append_tristate_false(DBusMessageIter *i, const char *property, void *data) {
|
||||
int *b = data;
|
||||
dbus_bool_t db;
|
||||
|
||||
assert(i);
|
||||
assert(property);
|
||||
assert(b);
|
||||
|
||||
db = *b > 0;
|
||||
|
||||
if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &db))
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bus_property_append_uint64(DBusMessageIter *i, const char *property, void *data) {
|
||||
assert(i);
|
||||
assert(property);
|
||||
|
@ -128,6 +128,7 @@ DBusHandlerResult bus_default_message_handler(
|
||||
int bus_property_append_string(DBusMessageIter *i, const char *property, void *data);
|
||||
int bus_property_append_strv(DBusMessageIter *i, const char *property, void *data);
|
||||
int bus_property_append_bool(DBusMessageIter *i, const char *property, void *data);
|
||||
int bus_property_append_tristate_false(DBusMessageIter *i, const char *property, void *data);
|
||||
int bus_property_append_int32(DBusMessageIter *i, const char *property, void *data);
|
||||
int bus_property_append_uint32(DBusMessageIter *i, const char *property, void *data);
|
||||
int bus_property_append_uint64(DBusMessageIter *i, const char *property, void *data);
|
||||
|
@ -416,6 +416,6 @@ const BusProperty bus_exec_context_properties[] = {
|
||||
{ "KillSignal", bus_property_append_int, "i", offsetof(ExecContext, kill_signal) },
|
||||
{ "UtmpIdentifier", bus_property_append_string, "s", offsetof(ExecContext, utmp_id), true },
|
||||
{ "ControlGroupModify", bus_property_append_bool, "b", offsetof(ExecContext, control_group_modify) },
|
||||
/* FIXME{ "ControlGroupPersistent", bus_property_append_bool, "b", offsetof(ExecContext, control_group_persistent) },*/
|
||||
{ "ControlGroupPersistent", bus_property_append_tristate_false, "b", offsetof(ExecContext, control_group_persistent) },
|
||||
{ NULL, }
|
||||
};
|
||||
|
@ -94,6 +94,7 @@
|
||||
" <property name=\"KillSignal\" type=\"i\" access=\"read\"/>\n" \
|
||||
" <property name=\"UtmpIdentifier\" type=\"s\" access=\"read\"/>\n" \
|
||||
" <property name=\"ControlGroupModify\" type=\"b\" access=\"read\"/>\n" \
|
||||
" <property name=\"ControlGroupPersistent\" type=\"b\" access=\"read\"/>\n" \
|
||||
" <property name=\"PrivateNetwork\" type=\"b\" access=\"read\"/>\n"
|
||||
|
||||
#define BUS_EXEC_COMMAND_INTERFACE(name) \
|
||||
|
Loading…
Reference in New Issue
Block a user