virStorageSourceParseNBDColonString: Rewrite to match what qemu does
Our implementation wasn't quite able to parse everything that qemu does. This patch rewrites the parser to a code that semantically resembles the combination of 'nbd_parse_filename' and 'inet_parse' methods in qemu to be able to parse the strings in an equivalent manner. The only thing that libvirt doesn't do is to check the lengths of various components in the nbd string in places where qemu uses constant size buffers. The test cases validate that some of the corner cases involving colons are parsed properly. https://bugzilla.redhat.com/show_bug.cgi?id=1826652Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
Showing
想要评论请 注册 或 登录