[libvirt] [PATCH] qemu: command: align disk serial check to schema

Martin Kletzander mkletzan at redhat.com
Mon Mar 27 14:35:54 UTC 2017


On Mon, Mar 27, 2017 at 02:40:27PM +0300, Nikolay Shirokovskiy wrote:
>Disk serial schema has extra '.+' allowed characters in comparison
>with check in code. Looks like there is no reason for that as qemu
>allows any character AFAIK for serial. This discrepancy is originated
>in 85d15b51 where ability to add serial was added.
>---
> src/qemu/qemu_command.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
>index c76f923..c5369b0 100644
>--- a/src/qemu/qemu_command.c
>+++ b/src/qemu/qemu_command.c
>@@ -432,7 +432,7 @@ qemuBuildIoEventFdStr(virBufferPtr buf,
> }
>
> #define QEMU_SERIAL_PARAM_ACCEPTED_CHARS \
>-  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_ "
>+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_ .+"
>

Thanks for noticing this.  However, could you also add (or adjust any
existing) tests for this?  Thanks.

> static int
> qemuSafeSerialParamValue(const char *value)
>--
>1.8.3.1
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170327/170a5025/attachment-0001.sig>


More information about the libvir-list mailing list