along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sys/types.h>
-#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <stddef.h>
-#include "log.h"
#include "util.h"
#include "sd-bus.h"
#include "bus-internal.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "build.h"
#include "strv.h"
-#include "def.h"
-#include "capability.h"
-#include "bus-control.h"
#include "set.h"
#include "driver.h"
#include "synthesize.h"
/* Let's sort the names list to make it stable */
strv_sort(names);
- return synthetic_reply_return_strv(m, names);
+ return synthetic_reply_method_return_strv(m, names);
} else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "ListNames")) {
_cleanup_strv_free_ char **names = NULL;
/* Let's sort the names list to make it stable */
strv_sort(names);
- return synthetic_reply_return_strv(m, names);
+ return synthetic_reply_method_return_strv(m, names);
} else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "ListQueuedOwners")) {
- struct kdbus_cmd_list cmd = {};
+ struct kdbus_cmd_list cmd = {
+ .flags = KDBUS_LIST_QUEUED,
+ .size = sizeof(cmd),
+ };
struct kdbus_info *name_list, *name;
_cleanup_strv_free_ char **owners = NULL;
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
if (r < 0)
return synthetic_reply_method_errno(m, r, NULL);
- cmd.flags = KDBUS_LIST_QUEUED;
r = ioctl(a->input_fd, KDBUS_CMD_LIST, &cmd);
if (r < 0)
return synthetic_reply_method_errno(m, -errno, NULL);
if (err < 0)
return synthetic_reply_method_errno(m, err, NULL);
- return synthetic_reply_return_strv(m, owners);
+ return synthetic_reply_method_return_strv(m, owners);
} else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "NameHasOwner")) {
const char *name;