summary refs log tree commit diff stats
path: root/migration/qemu-file.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2022-06-20 12:01:50 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2022-06-22 19:33:36 +0100
commitfbfa6404e597920ad72510461e0b0fed5243ce1d (patch)
treefbeb0b70234041557ea0027f59c59f23c3222076 /migration/qemu-file.c
parent154d87b4ef7f32fe4b11357648ec0b81b7e77d59 (diff)
downloadfocaccia-qemu-fbfa6404e597920ad72510461e0b0fed5243ce1d.tar.gz
focaccia-qemu-fbfa6404e597920ad72510461e0b0fed5243ce1d.zip
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
Diffstat (limited to 'migration/qemu-file.c')
-rw-r--r--migration/qemu-file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index eabc2d7c6e..7ee9b5bf05 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -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;