migration: rename vmstate_save_needed->vmstate_section_needed
The function is used on save at this point. The following commits will use it on load. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231024084043.2926316-5-marcandre.lureau@redhat.com>
This commit is contained in:
parent
bc3d41a9f6
commit
4d8bdc2ae0
@ -1202,7 +1202,7 @@ int vmstate_save_state_v(QEMUFile *f, const VMStateDescription *vmsd,
|
|||||||
void *opaque, JSONWriter *vmdesc,
|
void *opaque, JSONWriter *vmdesc,
|
||||||
int version_id, Error **errp);
|
int version_id, Error **errp);
|
||||||
|
|
||||||
bool vmstate_save_needed(const VMStateDescription *vmsd, void *opaque);
|
bool vmstate_section_needed(const VMStateDescription *vmsd, void *opaque);
|
||||||
|
|
||||||
#define VMSTATE_INSTANCE_ID_ANY -1
|
#define VMSTATE_INSTANCE_ID_ANY -1
|
||||||
|
|
||||||
|
@ -985,7 +985,7 @@ static int vmstate_save(QEMUFile *f, SaveStateEntry *se, JSONWriter *vmdesc)
|
|||||||
if ((!se->ops || !se->ops->save_state) && !se->vmsd) {
|
if ((!se->ops || !se->ops->save_state) && !se->vmsd) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (se->vmsd && !vmstate_save_needed(se->vmsd, se->opaque)) {
|
if (se->vmsd && !vmstate_section_needed(se->vmsd, se->opaque)) {
|
||||||
trace_savevm_section_skip(se->idstr, se->section_id);
|
trace_savevm_section_skip(se->idstr, se->section_id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -324,7 +324,7 @@ static void vmsd_desc_field_end(const VMStateDescription *vmsd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool vmstate_save_needed(const VMStateDescription *vmsd, void *opaque)
|
bool vmstate_section_needed(const VMStateDescription *vmsd, void *opaque)
|
||||||
{
|
{
|
||||||
if (vmsd->needed && !vmsd->needed(opaque)) {
|
if (vmsd->needed && !vmsd->needed(opaque)) {
|
||||||
/* optional section not needed */
|
/* optional section not needed */
|
||||||
@ -522,7 +522,7 @@ static int vmstate_subsection_save(QEMUFile *f, const VMStateDescription *vmsd,
|
|||||||
|
|
||||||
trace_vmstate_subsection_save_top(vmsd->name);
|
trace_vmstate_subsection_save_top(vmsd->name);
|
||||||
while (sub && *sub) {
|
while (sub && *sub) {
|
||||||
if (vmstate_save_needed(*sub, opaque)) {
|
if (vmstate_section_needed(*sub, opaque)) {
|
||||||
const VMStateDescription *vmsdsub = *sub;
|
const VMStateDescription *vmsdsub = *sub;
|
||||||
uint8_t len;
|
uint8_t len;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user