[PATCH 3/5] qapi/machine: Clarify query-uuid value when none has been specified

Markus Armbruster posted 5 patches 4 months, 2 weeks ago
Maintainers: Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>
[PATCH 3/5] qapi/machine: Clarify query-uuid value when none has been specified
Posted by Markus Armbruster 4 months, 2 weeks ago
When no UUID has been specified, query-uuid returns

    {"UUID": "00000000-0000-0000-0000-000000000000"}

The doc comment calls this "a null UUID", which I find less than
clear.  Change it to "an all-zero UUID".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qapi/machine.json | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/qapi/machine.json b/qapi/machine.json
index 50ff102d56..f40427f21a 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -305,9 +305,8 @@
 #
 # Since: 0.14
 #
-# .. note:: If no UUID was specified for the guest, a null UUID is
-#    returned.
-#
+# .. note:: If no UUID was specified for the guest, an all-zero UUID
+#    is returned.
 ##
 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
 
-- 
2.45.0
Re: [PATCH 3/5] qapi/machine: Clarify query-uuid value when none has been specified
Posted by John Snow 4 months, 1 week ago
On Thu, Jul 11, 2024, 7:22 AM Markus Armbruster <armbru@redhat.com> wrote:

> When no UUID has been specified, query-uuid returns
>
>     {"UUID": "00000000-0000-0000-0000-000000000000"}
>
> The doc comment calls this "a null UUID", which I find less than
> clear.  Change it to "an all-zero UUID".
>

Technically it's a "nil UUID";
https://datatracker.ietf.org/doc/html/rfc9562#name-nil-uuid

If you wanted to be pedantic, you could say "the nil UUID (all zeroes) is
returned"

but your rephrasing is clear even w/o using the standard name, so I'm fine
either way.


> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>

Reviewed-by: John Snow <jsnow@redhat.com>

---
>  qapi/machine.json | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 50ff102d56..f40427f21a 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -305,9 +305,8 @@
>  #
>  # Since: 0.14
>  #
> -# .. note:: If no UUID was specified for the guest, a null UUID is
> -#    returned.
> -#
> +# .. note:: If no UUID was specified for the guest, an all-zero UUID
> +#    is returned.
>  ##
>  { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
>
> --
> 2.45.0
>
>
Re: [PATCH 3/5] qapi/machine: Clarify query-uuid value when none has been specified
Posted by Markus Armbruster 4 months, 1 week ago
John Snow <jsnow@redhat.com> writes:

> On Thu, Jul 11, 2024, 7:22 AM Markus Armbruster <armbru@redhat.com> wrote:
>
>> When no UUID has been specified, query-uuid returns
>>
>>     {"UUID": "00000000-0000-0000-0000-000000000000"}
>>
>> The doc comment calls this "a null UUID", which I find less than
>> clear.  Change it to "an all-zero UUID".
>>
>
> Technically it's a "nil UUID";
> https://datatracker.ietf.org/doc/html/rfc9562#name-nil-uuid
>
> If you wanted to be pedantic, you could say "the nil UUID (all zeroes) is
> returned"

Sold!

> but your rephrasing is clear even w/o using the standard name, so I'm fine
> either way.
>
>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>>
>
> Reviewed-by: John Snow <jsnow@redhat.com>

Thank you!
Re: [PATCH 3/5] qapi/machine: Clarify query-uuid value when none has been specified
Posted by Philippe Mathieu-Daudé 4 months, 1 week ago
On 16/7/24 20:12, Markus Armbruster wrote:
> John Snow <jsnow@redhat.com> writes:
> 
>> On Thu, Jul 11, 2024, 7:22 AM Markus Armbruster <armbru@redhat.com> wrote:
>>
>>> When no UUID has been specified, query-uuid returns
>>>
>>>      {"UUID": "00000000-0000-0000-0000-000000000000"}
>>>
>>> The doc comment calls this "a null UUID", which I find less than
>>> clear.  Change it to "an all-zero UUID".
>>>
>>
>> Technically it's a "nil UUID";
>> https://datatracker.ietf.org/doc/html/rfc9562#name-nil-uuid
>>
>> If you wanted to be pedantic, you could say "the nil UUID (all zeroes) is
>> returned"

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>