* [PATCH] util/uuid: Define UUID_STR_LEN from UUID_NONE string
@ 2023-10-27 6:54 Cédric Le Goater
2023-10-27 7:18 ` Philippe Mathieu-Daudé
2023-10-30 8:59 ` Cédric Le Goater
0 siblings, 2 replies; 3+ messages in thread
From: Cédric Le Goater @ 2023-10-27 6:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Cédric Le Goater, Fam Zheng, Philippe Mathieu-Daudé
Cc: Fam Zheng <fam@euphon.net>
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
Follow up on :
https://lore.kernel.org/qemu-devel/20231026070636.1165037-1-clg@redhat.com/
include/qemu/uuid.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/qemu/uuid.h b/include/qemu/uuid.h
index 356efe7b5797911640ed347fc08f4ef5ebbd0476..869f84af09ddc4aa80d53e133c323781ade4d190 100644
--- a/include/qemu/uuid.h
+++ b/include/qemu/uuid.h
@@ -78,9 +78,10 @@ typedef struct {
"%02hhx%02hhx-" \
"%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
-#define UUID_STR_LEN (36 + 1)
-
#define UUID_NONE "00000000-0000-0000-0000-000000000000"
+QEMU_BUILD_BUG_ON(sizeof(UUID_NONE) - 1 != 36);
+
+#define UUID_STR_LEN sizeof(UUID_NONE)
void qemu_uuid_generate(QemuUUID *out);
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] util/uuid: Define UUID_STR_LEN from UUID_NONE string
2023-10-27 6:54 [PATCH] util/uuid: Define UUID_STR_LEN from UUID_NONE string Cédric Le Goater
@ 2023-10-27 7:18 ` Philippe Mathieu-Daudé
2023-10-30 8:59 ` Cédric Le Goater
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-27 7:18 UTC (permalink / raw)
To: Cédric Le Goater, qemu-devel; +Cc: Fam Zheng
On 27/10/23 08:54, Cédric Le Goater wrote:
> Cc: Fam Zheng <fam@euphon.net>
> Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
> ---
>
> Follow up on :
>
> https://lore.kernel.org/qemu-devel/20231026070636.1165037-1-clg@redhat.com/
>
> include/qemu/uuid.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] util/uuid: Define UUID_STR_LEN from UUID_NONE string
2023-10-27 6:54 [PATCH] util/uuid: Define UUID_STR_LEN from UUID_NONE string Cédric Le Goater
2023-10-27 7:18 ` Philippe Mathieu-Daudé
@ 2023-10-30 8:59 ` Cédric Le Goater
1 sibling, 0 replies; 3+ messages in thread
From: Cédric Le Goater @ 2023-10-30 8:59 UTC (permalink / raw)
To: qemu-devel; +Cc: Fam Zheng, Philippe Mathieu-Daudé
On 10/27/23 08:54, Cédric Le Goater wrote:
> Cc: Fam Zheng <fam@euphon.net>
> Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
> ---
>
> Follow up on :
>
> https://lore.kernel.org/qemu-devel/20231026070636.1165037-1-clg@redhat.com/
>
> include/qemu/uuid.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/include/qemu/uuid.h b/include/qemu/uuid.h
> index 356efe7b5797911640ed347fc08f4ef5ebbd0476..869f84af09ddc4aa80d53e133c323781ade4d190 100644
> --- a/include/qemu/uuid.h
> +++ b/include/qemu/uuid.h
> @@ -78,9 +78,10 @@ typedef struct {
> "%02hhx%02hhx-" \
> "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
>
> -#define UUID_STR_LEN (36 + 1)
> -
> #define UUID_NONE "00000000-0000-0000-0000-000000000000"
> +QEMU_BUILD_BUG_ON(sizeof(UUID_NONE) - 1 != 36);
> +
> +#define UUID_STR_LEN sizeof(UUID_NONE)
>
> void qemu_uuid_generate(QemuUUID *out);
>
Applied to vfio-next.
Thanks,
C.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-30 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-27 6:54 [PATCH] util/uuid: Define UUID_STR_LEN from UUID_NONE string Cédric Le Goater
2023-10-27 7:18 ` Philippe Mathieu-Daudé
2023-10-30 8:59 ` Cédric Le Goater
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).