commands.c (8c1c07929feae876202ba26f07a540c5115c18cd) commands.c (54aa3de72ea2aaa2e903e7e879a4f3dda515a00e)
1/*
2 * QEMU Guest Agent common/cross-platform command implementations
3 *
4 * Copyright IBM Corp. 2012
5 *
6 * Authors:
7 * Michael Roth <mdroth@linux.vnet.ibm.com>
8 *

--- 52 unchanged lines hidden (view full) ---

61{
62 slog("guest-ping called");
63}
64
65static void qmp_command_info(const QmpCommand *cmd, void *opaque)
66{
67 GuestAgentInfo *info = opaque;
68 GuestAgentCommandInfo *cmd_info;
1/*
2 * QEMU Guest Agent common/cross-platform command implementations
3 *
4 * Copyright IBM Corp. 2012
5 *
6 * Authors:
7 * Michael Roth <mdroth@linux.vnet.ibm.com>
8 *

--- 52 unchanged lines hidden (view full) ---

61{
62 slog("guest-ping called");
63}
64
65static void qmp_command_info(const QmpCommand *cmd, void *opaque)
66{
67 GuestAgentInfo *info = opaque;
68 GuestAgentCommandInfo *cmd_info;
69 GuestAgentCommandInfoList *cmd_info_list;
70
71 cmd_info = g_new0(GuestAgentCommandInfo, 1);
72 cmd_info->name = g_strdup(qmp_command_name(cmd));
73 cmd_info->enabled = qmp_command_is_enabled(cmd);
74 cmd_info->success_response = qmp_has_success_response(cmd);
75
69
70 cmd_info = g_new0(GuestAgentCommandInfo, 1);
71 cmd_info->name = g_strdup(qmp_command_name(cmd));
72 cmd_info->enabled = qmp_command_is_enabled(cmd);
73 cmd_info->success_response = qmp_has_success_response(cmd);
74
76 cmd_info_list = g_new0(GuestAgentCommandInfoList, 1);
77 cmd_info_list->value = cmd_info;
78 cmd_info_list->next = info->supported_commands;
79 info->supported_commands = cmd_info_list;
75 QAPI_LIST_PREPEND(info->supported_commands, cmd_info);
80}
81
82struct GuestAgentInfo *qmp_guest_info(Error **errp)
83{
84 GuestAgentInfo *info = g_new0(GuestAgentInfo, 1);
85
86 info->version = g_strdup(QEMU_VERSION);
87 qmp_for_each_command(&ga_commands, qmp_command_info, info);

--- 504 unchanged lines hidden ---
76}
77
78struct GuestAgentInfo *qmp_guest_info(Error **errp)
79{
80 GuestAgentInfo *info = g_new0(GuestAgentInfo, 1);
81
82 info->version = g_strdup(QEMU_VERSION);
83 qmp_for_each_command(&ga_commands, qmp_command_info, info);

--- 504 unchanged lines hidden ---