summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* vpc: Use bdrv_(p)write_sync for metadata writesKevin Wolf2010-07-201-4/+5
| | | | | | | | | | | | | Use bdrv_(p)write_sync to ensure metadata integrity in case of a crash. Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 078a458e077d6b0db262c4b05fee51d01de2d1d2) Conflicts: block/vpc.c Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block/vpc: Fix conversion from size to disk geometryStefan Weil2010-07-201-9/+12
| | | | | | | | | | | | | | | | | | | | The VHD algorithm calculates a disk geometry which is usually smaller than the requested size. QEMU tried to round up but failed for certain sizes: qemu-img create -f vpc disk.vpc 9437184 would create an image with 9435136 bytes (which is too small for qemu-img convert). Instead of hacking the geometry algorithm, the patch increases the number of sectors until we get enough sectors. Cc: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit dede4188cc817a039154ed2ecd7f3285f6b94056)
* Fix spelling in comment.Stefan Weil2009-09-091-1/+1
| | | | | | | | The company which made Virtual PC was Connectix. They use the magic string "conectix" in their disk images. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* eliminate errors about unused results in block/vpc.cNathan Froyd2009-08-241-4/+4
| | | | | | | | | | | | | | | These errors come up when compiling with gcc-4.3.3 and some older headers: /scratch/froydnj/qemu.git/block/vpc.c: In function 'vpc_create': /scratch/froydnj/qemu.git/block/vpc.c:514: error: value computed is not used /scratch/froydnj/qemu.git/block/vpc.c:516: error: value computed is not used /scratch/froydnj/qemu.git/block/vpc.c:517: error: value computed is not used /scratch/froydnj/qemu.git/block/vpc.c:566: error: value computed is not used Use memcpy to copy the strings instead of strncpy. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-img: Print available options with -o ?Kevin Wolf2009-06-061-1/+5
| | | | | | | This patch adds a small help text to each of the options in the block drivers which can be displayed by using qemu-img create -f fmt -o ? Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Convert all block drivers to new bdrv_createKevin Wolf2009-05-221-4/+17
| | | | | | | | | | | | Now we can make use of the newly introduced option structures. Instead of having bdrv_create carry more and more parameters (which are format specific in most cases), just pass a option structure as defined by the driver itself. bdrv_create2() contains an emulation of the old interface to simplify the transition. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Move block drivers into their own directoryAnthony Liguori2009-05-141-0/+606
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>