crete-dev icon indicating copy to clipboard operation
crete-dev copied to clipboard

[vm-node] QEMU will fail if extra space in dispatch XML crete.vm.args

Open moralismercatus opened this issue 8 years ago • 0 comments

Consider dispatch.xml:

<crete>
  <vm>
    <args>-m 512  -nographic</args>
  </vm>
</crete>

It may be difficult to see, but there are two spaces between 512 and -nographic.

The parser in vm-node will interpret this as an additional argument because it uses a simple string split. QEMU will fail, as it is unable to recognize an empty string as a valid argument.

Solution:

Use the parsing algorithm used in svm-node. It specifically handles this problem. It is more robust generally. Regex would be the most complete solution.

moralismercatus avatar Dec 01 '16 01:12 moralismercatus