mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
migration: rename qemu_ftell to qemu_file_total_transferred
The name 'ftell' gives the misleading impression that the QEMUFile objects are seekable. This is not the case, as in general we just have an opaque stream. The users of this method are only interested in the total bytes processed. This switches to a new name that reflects the intended usage. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> dgilbert: Wrapped long line
This commit is contained in:
parent
154d87b4ef
commit
fbfa6404e5
6 changed files with 46 additions and 15 deletions
|
|
@ -657,7 +657,7 @@ int qemu_get_byte(QEMUFile *f)
|
|||
return result;
|
||||
}
|
||||
|
||||
int64_t qemu_ftell_fast(QEMUFile *f)
|
||||
int64_t qemu_file_total_transferred_fast(QEMUFile *f)
|
||||
{
|
||||
int64_t ret = f->total_transferred;
|
||||
int i;
|
||||
|
|
@ -669,7 +669,7 @@ int64_t qemu_ftell_fast(QEMUFile *f)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int64_t qemu_ftell(QEMUFile *f)
|
||||
int64_t qemu_file_total_transferred(QEMUFile *f)
|
||||
{
|
||||
qemu_fflush(f);
|
||||
return f->total_transferred;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue