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:
Daniel P. Berrangé 2022-06-20 12:01:50 +01:00 committed by Dr. David Alan Gilbert
parent 154d87b4ef
commit fbfa6404e5
6 changed files with 46 additions and 15 deletions

View file

@ -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;