« Previous | Next » 

Revision cb78466e

IDcb78466ef60ccf707a6f38a1294c435b65a828e0

Added by Stefan Hajnoczi almost 11 years ago

blockdev: drop redundant proto_drv check

It is not necessary to check that we can find a protocol block driver
since we create or open the image file. This produces the error that we
need anyway.

Besides, the QERR_INVALID_BLOCK_FORMAT is inappropriate since the
protocol is incorrect rather than the format.

Also drop an empty line between bdrv_open() and checking its return
value. This may be due to copy-pasting from earlier code that performed
other operations before handling errors.

Reported-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>
Reviewed-by: Wenchao Xia <>
Reviewed-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Kevin Wolf <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences