All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]Use a marco to standardize XEN uuid length
@ 2007-08-24  5:14 Zhang, Xing Z
  2007-08-24 14:45 ` Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Zhang, Xing Z @ 2007-08-24  5:14 UTC (permalink / raw)
  To: xen-devel, Keir Fraser; +Cc: xen-ia64-devel

[-- Attachment #1: Type: text/plain, Size: 86 bytes --]

This patch use a marco instead of hard code in smbios.c.
IA64 also need this marco.

[-- Attachment #2: use_marco_for_uuid_len_in_smbios.patch --]
[-- Type: application/octet-stream, Size: 2480 bytes --]

Use a macro stardardize XEN uuid length

Signed-off-by, Zhang Xin < xing.z.zhang@intel.com>
diff -r 5b19839d0365 tools/firmware/hvmloader/smbios.c
--- a/tools/firmware/hvmloader/smbios.c	Sun Aug 12 12:19:13 2007 -0600
+++ b/tools/firmware/hvmloader/smbios.c	Wed Aug 22 15:41:36 2007 +0800
@@ -30,7 +30,7 @@ static int
 static int
 write_smbios_tables(void *start,
                     uint32_t vcpus, uint64_t memsize,
-                    uint8_t uuid[16], char *xen_version,
+                    uint8_t uuid[XENVER_UUID_LEN], char *xen_version,
                     uint32_t xen_major_version, uint32_t xen_minor_version);
 
 static void
@@ -46,7 +46,7 @@ smbios_type_0_init(void *start, const ch
                    uint32_t xen_major_version, uint32_t xen_minor_version);
 static void *
 smbios_type_1_init(void *start, const char *xen_version, 
-                   uint8_t uuid[16]);
+                   uint8_t uuid[XENVER_UUID_LEN]);
 static void *
 smbios_type_3_init(void *start);
 static void *
@@ -85,7 +85,7 @@ static int
 static int
 write_smbios_tables(void *start,
                     uint32_t vcpus, uint64_t memsize,
-                    uint8_t uuid[16], char *xen_version,
+                    uint8_t uuid[XENVER_UUID_LEN], char *xen_version,
                     uint32_t xen_major_version, uint32_t xen_minor_version)
 {
     unsigned cpu_num, nr_structs = 0, max_struct_size = 0;
@@ -159,7 +159,7 @@ int
 int
 hvm_write_smbios_tables(void)
 {
-    uint8_t uuid[16]; /* ** This will break if xen_domain_handle_t is
+    uint8_t uuid[XENVER_UUID_LEN]; /* ** This will break if xen_domain_handle_t is
                          not uint8_t[16]. ** */
     uint16_t xen_major_version, xen_minor_version;
     uint32_t xen_version;
@@ -314,7 +314,7 @@ smbios_type_0_init(void *start, const ch
 /* Type 1 -- System Information */
 static void *
 smbios_type_1_init(void *start, const char *xen_version, 
-                   uint8_t uuid[16])
+                   uint8_t uuid[XENVER_UUID_LEN])
 {
     char uuid_str[37];
     struct smbios_type_1 *p = (struct smbios_type_1 *)start;
diff -r 5b19839d0365 xen/include/public/version.h
--- a/xen/include/public/version.h	Sun Aug 12 12:19:13 2007 -0600
+++ b/xen/include/public/version.h	Wed Aug 22 11:13:00 2007 +0800
@@ -77,6 +77,7 @@ typedef struct xen_feature_info xen_feat
 
 /* arg == xen_domain_handle_t. */
 #define XENVER_guest_handle 8
+#define XENVER_UUID_LEN	16
 
 #endif /* __XEN_PUBLIC_VERSION_H__ */
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-27  6:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-24  5:14 [PATCH]Use a marco to standardize XEN uuid length Zhang, Xing Z
2007-08-24 14:45 ` Keir Fraser
2007-08-24 14:58   ` Alex Williamson
2007-08-27  6:22   ` Zhang, Xing Z

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.