mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-02-04 07:10:41 -07:00
The vmstate_(load|save)_state start out with an a void *opaque pointing to some struct, and manipulate one or more elements of one field within that struct. First the field within the struct is pinpointed as opaque + offset, then if this is a pointer the pointer is dereferenced to obtain a pointer to the first element of the vmstate field. Pointers to further elements if any are calculated as first_element + i * element_size (where i is the zero based index of the element in question). Currently base_addr and addr is used as a variable name for the pointer to the first element and the pointer to the current element being processed. This is suboptimal because base_addr is somewhat counter-intuitive (because obtained as base + offset) and both base_addr and addr not very descriptive (that we have a pointer should be clear from the fact that it is declared as a pointer). Let make things easier to understand by renaming base_addr to first_elem and addr to curr_elem. This has the additional benefit of harmonizing with other names within the scope (n_elems, vmstate_n_elems). Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20170222160119.52771-2-pasic@linux.vnet.ibm.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> |
||
|---|---|---|
| .. | ||
| block.c | ||
| colo-comm.c | ||
| colo-failover.c | ||
| colo.c | ||
| exec.c | ||
| fd.c | ||
| Makefile.objs | ||
| migration.c | ||
| postcopy-ram.c | ||
| qemu-file-channel.c | ||
| qemu-file.c | ||
| qjson.c | ||
| ram.c | ||
| rdma.c | ||
| savevm.c | ||
| socket.c | ||
| tls.c | ||
| trace-events | ||
| vmstate.c | ||
| xbzrle.c | ||