Diff for /qemu/savevm.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2018/04/24 16:56:23 version 1.1.1.3, 2018/04/24 17:01:40
Line 306  typedef struct QEMUFileBdrv Line 306  typedef struct QEMUFileBdrv
     int64_t base_offset;      int64_t base_offset;
 } QEMUFileBdrv;  } QEMUFileBdrv;
   
 static int bdrv_put_buffer(void *opaque, const uint8_t *buf,  static int block_put_buffer(void *opaque, const uint8_t *buf,
                            int64_t pos, int size)                             int64_t pos, int size)
 {  {
     QEMUFileBdrv *s = opaque;      QEMUFileBdrv *s = opaque;
     bdrv_pwrite(s->bs, s->base_offset + pos, buf, size);      bdrv_put_buffer(s->bs, buf, s->base_offset + pos, size);
     return size;      return size;
 }  }
   
 static int bdrv_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size)  static int block_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size)
 {  {
     QEMUFileBdrv *s = opaque;      QEMUFileBdrv *s = opaque;
     return bdrv_pread(s->bs, s->base_offset + pos, buf, size);      return bdrv_get_buffer(s->bs, buf, s->base_offset + pos, size);
 }  }
   
 static int bdrv_fclose(void *opaque)  static int bdrv_fclose(void *opaque)
Line 337  static QEMUFile *qemu_fopen_bdrv(BlockDr Line 337  static QEMUFile *qemu_fopen_bdrv(BlockDr
     s->base_offset = offset;      s->base_offset = offset;
   
     if (is_writable)      if (is_writable)
         return qemu_fopen_ops(s, bdrv_put_buffer, NULL, bdrv_fclose, NULL);          return qemu_fopen_ops(s, block_put_buffer, NULL, bdrv_fclose, NULL);
   
     return qemu_fopen_ops(s, NULL, bdrv_get_buffer, bdrv_fclose, NULL);      return qemu_fopen_ops(s, NULL, block_get_buffer, bdrv_fclose, NULL);
 }  }
   
 QEMUFile *qemu_fopen_ops(void *opaque, QEMUFilePutBufferFunc *put_buffer,  QEMUFile *qemu_fopen_ops(void *opaque, QEMUFilePutBufferFunc *put_buffer,
Line 366  int qemu_file_has_error(QEMUFile *f) Line 366  int qemu_file_has_error(QEMUFile *f)
     return f->has_error;      return f->has_error;
 }  }
   
   void qemu_file_set_error(QEMUFile *f)
   {
       f->has_error = 1;
   }
   
 void qemu_fflush(QEMUFile *f)  void qemu_fflush(QEMUFile *f)
 {  {
     if (!f->put_buffer)      if (!f->put_buffer)

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


unix.superglobalmegacorp.com