Diff for /qemu/block.c between versions 1.1.1.19 and 1.1.1.20

version 1.1.1.19, 2018/04/24 18:34:00 version 1.1.1.20, 2018/04/24 18:43:37
Line 697  void bdrv_close_all(void) Line 697  void bdrv_close_all(void)
     }      }
 }  }
   
   /* make a BlockDriverState anonymous by removing from bdrv_state list.
      Also, NULL terminate the device_name to prevent double remove */
   void bdrv_make_anon(BlockDriverState *bs)
   {
       if (bs->device_name[0] != '\0') {
           QTAILQ_REMOVE(&bdrv_states, bs, list);
       }
       bs->device_name[0] = '\0';
   }
   
 void bdrv_delete(BlockDriverState *bs)  void bdrv_delete(BlockDriverState *bs)
 {  {
     assert(!bs->peer);      assert(!bs->peer);
   
     /* remove from list, if necessary */      /* remove from list, if necessary */
     if (bs->device_name[0] != '\0') {      bdrv_make_anon(bs);
         QTAILQ_REMOVE(&bdrv_states, bs, list);  
     }  
   
     bdrv_close(bs);      bdrv_close(bs);
     if (bs->file != NULL) {      if (bs->file != NULL) {
Line 2295  int bdrv_aio_multiwrite(BlockDriverState Line 2303  int bdrv_aio_multiwrite(BlockDriverState
     MultiwriteCB *mcb;      MultiwriteCB *mcb;
     int i;      int i;
   
       /* don't submit writes if we don't have a medium */
       if (bs->drv == NULL) {
           for (i = 0; i < num_reqs; i++) {
               reqs[i].error = -ENOMEDIUM;
           }
           return -1;
       }
   
     if (num_reqs == 0) {      if (num_reqs == 0) {
         return 0;          return 0;
     }      }

Removed from v.1.1.1.19  
changed lines
  Added in v.1.1.1.20


unix.superglobalmegacorp.com