Patchwork [32/41] savevm: unexport qemu_ftell()

login
register
mail settings
Submitter Juan Quintela
Date Sept. 21, 2012, 8:47 a.m.
Message ID <1348217255-22441-33-git-send-email-quintela@redhat.com>
Download mbox | patch
Permalink /patch/185639/
State New
Headers show

Comments

Juan Quintela - Sept. 21, 2012, 8:47 a.m.
It was unused out of savevm.c.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 qemu-file.h | 3 ---
 savevm.c    | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)
Paolo Bonzini - Sept. 21, 2012, 12:48 p.m.
Il 21/09/2012 10:47, Juan Quintela ha scritto:
> It was unused out of savevm.c.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  qemu-file.h | 3 ---
>  savevm.c    | 2 +-
>  2 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/qemu-file.h b/qemu-file.h
> index 7fe7274..289849a 100644
> --- a/qemu-file.h
> +++ b/qemu-file.h
> @@ -230,7 +230,4 @@ static inline void qemu_get_sbe64s(QEMUFile *f, int64_t *pv)
>  {
>      qemu_get_be64s(f, (uint64_t *)pv);
>  }
> -
> -int64_t qemu_ftell(QEMUFile *f);
> -
>  #endif
> diff --git a/savevm.c b/savevm.c
> index 8efa7cc..8ddb9d5 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -664,7 +664,7 @@ int qemu_get_byte(QEMUFile *f)
>      return result;
>  }
> 
> -int64_t qemu_ftell(QEMUFile *f)
> +static int64_t qemu_ftell(QEMUFile *f)
>  {
>      return f->buf_offset - f->buf_size + f->buf_index;
>  }
> 

static inline?

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Juan Quintela - Sept. 21, 2012, 3:42 p.m.
Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 21/09/2012 10:47, Juan Quintela ha scritto:
>> It was unused out of savevm.c.
>> 
>> -int64_t qemu_ftell(QEMUFile *f)
>> +static int64_t qemu_ftell(QEMUFile *f)
>>  {
>>      return f->buf_offset - f->buf_size + f->buf_index;
>>  }
>> 
>
> static inline?

Used only once, when doing one snapshot ....

> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Patch

diff --git a/qemu-file.h b/qemu-file.h
index 7fe7274..289849a 100644
--- a/qemu-file.h
+++ b/qemu-file.h
@@ -230,7 +230,4 @@  static inline void qemu_get_sbe64s(QEMUFile *f, int64_t *pv)
 {
     qemu_get_be64s(f, (uint64_t *)pv);
 }
-
-int64_t qemu_ftell(QEMUFile *f);
-
 #endif
diff --git a/savevm.c b/savevm.c
index 8efa7cc..8ddb9d5 100644
--- a/savevm.c
+++ b/savevm.c
@@ -664,7 +664,7 @@  int qemu_get_byte(QEMUFile *f)
     return result;
 }

-int64_t qemu_ftell(QEMUFile *f)
+static int64_t qemu_ftell(QEMUFile *f)
 {
     return f->buf_offset - f->buf_size + f->buf_index;
 }