block/raw-posix: Strip protocol prefix on creation
commitcc28c6aa46334be01f3e65a74601ae38f94bd602
authorMax Reitz <mreitz@redhat.com>
Fri, 7 Mar 2014 23:39:44 +0000 (8 00:39 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 13 Mar 2014 13:42:25 +0000 (13 14:42 +0100)
tree58d6d060a1ed7f0f70b8ff8d8eebccf5369f9311
parent18fa1c42a314a3e18f097b28ec5189a144d36f99
block/raw-posix: Strip protocol prefix on creation

The hdev_create() implementation in block/raw-posix.c is used by the
"host_device", "host_cdrom" and "host_floppy" protocol block drivers
together. Thus, any of the associated prefixes may occur and exactly one
should should be stripped, if it does (thus,
"host_device:host_cdrom:/dev/cdrom" is not shortened to "/dev/cdrom").

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/raw-posix.c