From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLJZg-0004WW-Qo for qemu-devel@nongnu.org; Wed, 05 Mar 2014 16:42:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLJZa-0002c1-Nx for qemu-devel@nongnu.org; Wed, 05 Mar 2014 16:42:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLJZa-0002bu-FE for qemu-devel@nongnu.org; Wed, 05 Mar 2014 16:41:54 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s25LfqrR012313 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 5 Mar 2014 16:41:53 -0500 From: Max Reitz Date: Wed, 5 Mar 2014 22:41:38 +0100 Message-Id: <1394055700-5988-4-git-send-email-mreitz@redhat.com> In-Reply-To: <1394055700-5988-1-git-send-email-mreitz@redhat.com> References: <1394055700-5988-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 3/5] block/raw-posix: Strip "file:" prefix on creation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz The bdrv_create() implementation of the block/raw-posix "file" protocol driver should strip the "file:" prefix from filenames if present. Signed-off-by: Max Reitz --- block/raw-posix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index 892145c..e6b4c1f 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -1241,6 +1241,8 @@ static int raw_create(const char *filename, QEMUOptionParameter *options, int result = 0; int64_t total_size = 0; + strstart(filename, "file:", &filename); + /* Read out options */ while (options && options->name) { if (!strcmp(options->name, BLOCK_OPT_SIZE)) { -- 1.9.0