« Previous | Next » 

Revision 9e0b22f4

ID9e0b22f4f2c4122bb3544bb44fb7ce2fd7964c12

Added by Stefan Hajnoczi over 13 years ago

block: Introduce path_has_protocol() function

The bdrv_find_protocol() function returns NULL if an unknown protocol
name is given. It returns the "file" protocol when the filename
contains no protocol at all. This makes it difficult to distinguish
between paths which contain a protocol and those which do not.

Factor out a helper function that tests whether or not a filename has a
protocol. The next patch makes use of this function.

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Kevin Wolf <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences