mirror of https://github.com/proxmox/mirror_qemu
savevm: Remove qemu_fseek()
It has no users, and is only half implemented. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>master
parent
e398d61b47
commit
e5ae97cee4
|
@ -232,6 +232,5 @@ static inline void qemu_get_sbe64s(QEMUFile *f, int64_t *pv)
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t qemu_ftell(QEMUFile *f);
|
int64_t qemu_ftell(QEMUFile *f);
|
||||||
int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
21
savevm.c
21
savevm.c
|
@ -676,27 +676,6 @@ int64_t qemu_ftell(QEMUFile *f)
|
||||||
return f->buf_offset - f->buf_size + f->buf_index;
|
return f->buf_offset - f->buf_size + f->buf_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence)
|
|
||||||
{
|
|
||||||
if (whence == SEEK_SET) {
|
|
||||||
/* nothing to do */
|
|
||||||
} else if (whence == SEEK_CUR) {
|
|
||||||
pos += qemu_ftell(f);
|
|
||||||
} else {
|
|
||||||
/* SEEK_END not supported */
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (f->put_buffer) {
|
|
||||||
qemu_fflush(f);
|
|
||||||
f->buf_offset = pos;
|
|
||||||
} else {
|
|
||||||
f->buf_offset = pos;
|
|
||||||
f->buf_index = 0;
|
|
||||||
f->buf_size = 0;
|
|
||||||
}
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
int qemu_file_rate_limit(QEMUFile *f)
|
int qemu_file_rate_limit(QEMUFile *f)
|
||||||
{
|
{
|
||||||
if (f->rate_limit)
|
if (f->rate_limit)
|
||||||
|
|
Loading…
Reference in New Issue