Bill Rieske wrote:
The field within the Memory Device type 17 is only a word with the MSB being 
used to report MB/KB.  Thereby, a guest with 32G and greater would report 
incorrect memory device information rolling over to 0.

This presents more than one memory device and associated memory structures if 
the memory is larger than 16G

Signed-off-by: Bill Rieske <brieske@@novell.com>

diff --git a/bios/rombios32.c b/bios/rombios32.c
index a91b155..bc69945 100755
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -173,6 +173,26 @@ static inline int isdigit(int c)
     return c >= '0' && c <= '9';
 }
+char *itoa(char *a, unsigned int i)
+{
+    unsigned int _i = i, x = 0;
+
+    do {
+        x++;
+        _i /= 10;
+    } while ( _i != 0 );
+
+    a += x;
+    *a-- = '\0';
+
+    do {
+        *a-- = (i % 10) + '0';
+        i /= 10;
+    } while ( i != 0 );
+
+    return a + 1;
+}
+

Instead of this, can you add an snprintf() (in a separate patch) and use it? There's already a vsnprintf() so all the heavy machinery is in place.

 void *memset(void *d1, int val, size_t len)
 {
     uint8_t *d = d1;
@@ -220,6 +240,16 @@ size_t strlen(const char *s)
     return s1 - s;
 }
+char *
+strcpy(char *dest, const char *src)
+{
+    char *p = dest;
+    while ( *src )
+        *p++ = *src++;
+    *p = 0;
+    return dest;
+}
+

This would eliminate the need for strcpy(), I think.


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to