Received: from [140.186.70.92] (port=37547 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcyOJ-0000XR-Lx for qemu-devel@nongnu.org; Wed, 12 Jan 2011 05:57:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcyOI-0004n0-Fb for qemu-devel@nongnu.org; Wed, 12 Jan 2011 05:57:23 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:34871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcyOI-0004ln-7z for qemu-devel@nongnu.org; Wed, 12 Jan 2011 05:57:22 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 07907A0A8E for ; Wed, 12 Jan 2011 13:57:18 +0300 (MSK) (envelope-from mjt@tls.msk.ru) From: Michael Tokarev Date: Wed, 12 Jan 2011 13:56:59 +0300 Message-Id: <1294829822-27938-1-git-send-email-mjt@msgid.tls.msk.ru> Subject: [Qemu-devel] [PATCH 0/3] unify protocol: and drive-letter: handling in filenames List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.orgqemu-devel@nongnu.org Cc: Michael Tokarev Currently recognision of protocol: and d: (drive letter on windows) are spread over in block.c in adhoc manner, disallows usage of filenames with colons in them, intermixes URLs (which should be treated as protocol-specific) and pathnames. The following patch series tries to address these defects. After this patch series, protocol: prefix is recognized as such only if it matches [a-z_]{1,31} pattern (so e.g. ./foo:bar is not recognized as having protocol "./foo"), we don't combine c:\foo and d:bar on windows to form (incorrect) c:\bar anymore, and overall path handling is now a bit more clean, in my opinion anyway. The patchset is, unfortunately, untested on Windows. Thanks! Michael Tokarev (3): make path_has_protocol() to return pointer instead of bool use new path_has_protocol() in bdrv_find_protocol() make path_combine() especially for filenames, not URLs block.c | 97 +++++++++++++++++++++++++++----------------------------------- 1 files changed, 42 insertions(+), 55 deletions(-) -- 1.7.2.3