Commit e94f3a609eb96471af2e4122ddfa1384b93b4ba8

Authored by aliguori
1 parent 61fce45f

Revert 4977. Laurent asked for this not to be applied but I mistakenly applied

it.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>




git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4978 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 1 additions and 4 deletions
qemu-img.c
... ... @@ -208,7 +208,6 @@ static int img_create(int argc, char **argv)
208 208 uint64_t size;
209 209 const char *p;
210 210 BlockDriver *drv;
211   - BlockDriverState *bs;
212 211  
213 212 flags = 0;
214 213 for(;;) {
... ... @@ -238,6 +237,7 @@ static int img_create(int argc, char **argv)
238 237 filename = argv[optind++];
239 238 size = 0;
240 239 if (base_filename) {
  240 + BlockDriverState *bs;
241 241 bs = bdrv_new_open(base_filename, NULL);
242 242 bdrv_get_geometry(bs, &size);
243 243 size *= 512;
... ... @@ -279,9 +279,6 @@ static int img_create(int argc, char **argv)
279 279 error("Error while formatting");
280 280 }
281 281 }
282   - /* to set password */
283   - bs = bdrv_new_open(filename, NULL);
284   - bdrv_delete(bs);
285 282 return 0;
286 283 }
287 284  
... ...