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

version 1.1.1.2, 2018/04/24 16:38:32 version 1.1.1.3, 2018/04/24 16:40:43
Line 44 Line 44
 #include <CoreFoundation/CoreFoundation.h>  #include <CoreFoundation/CoreFoundation.h>
 #endif  #endif
   
   #ifdef __sun__
   #include <sys/dkio.h>
   #endif
   
 static BlockDriverState *bdrv_first;  static BlockDriverState *bdrv_first;
 static BlockDriver *first_drv;  static BlockDriver *first_drv;
   
Line 648  void bdrv_info(void) Line 652  void bdrv_info(void)
     }      }
 }  }
   
   
 /**************************************************************/  /**************************************************************/
 /* RAW block driver */  /* RAW block driver */
   
Line 669  static int raw_open(BlockDriverState *bs Line 672  static int raw_open(BlockDriverState *bs
 #ifdef _BSD  #ifdef _BSD
     struct stat sb;      struct stat sb;
 #endif  #endif
   #ifdef __sun__
       struct dk_minfo minfo;
       int rv;
   #endif
   
     fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);      fd = open(filename, O_RDWR | O_BINARY | O_LARGEFILE);
     if (fd < 0) {      if (fd < 0) {
Line 689  static int raw_open(BlockDriverState *bs Line 696  static int raw_open(BlockDriverState *bs
 #endif  #endif
     } else      } else
 #endif  #endif
   #ifdef __sun__
       /*
        * use the DKIOCGMEDIAINFO ioctl to read the size.
        */
       rv = ioctl ( fd, DKIOCGMEDIAINFO, &minfo );
       if ( rv != -1 ) {
           size = minfo.dki_lbsize * minfo.dki_capacity;
       } else /* there are reports that lseek on some devices
                 fails, but irc discussion said that contingency
                 on contingency was overkill */
   #endif
     {      {
         size = lseek(fd, 0, SEEK_END);          size = lseek(fd, 0, SEEK_END);
     }      }

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


unix.superglobalmegacorp.com