[Lguest] [trivial PATCH] Fix long != int in lguest_device printk

Christian Borntraeger borntraeger at de.ibm.com
Wed Jan 16 01:45:17 EST 2008


Rusty,
this patch is against the lguest code found in Dors virtio tree.
I found it, when I compiled lguest_device.c on 64bit. A pointer is
compatible with unsigned long, not unsigned int.

I dont know if we want to keep that printk, if yes - here is a 64bit fix.

Signed-off-by: Christian Borntraeger <borntraeger at de.ibm.com>
---
 drivers/lguest/lguest_device.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: kvm/drivers/lguest/lguest_device.c
===================================================================
--- kvm.orig/drivers/lguest/lguest_device.c
+++ kvm/drivers/lguest/lguest_device.c
@@ -116,7 +116,7 @@ static void lg_get(struct virtio_device 
 
 	/* Check they didn't ask for more than the length of the config! */
 	BUG_ON(offset + len > desc->config_len);
-	printk("Getting config len %u from page offset %u\n",
+	printk("Getting config len %u from page offset %lu\n",
 	       len, lg_config(desc) + offset - (u8 *)lguest_devices);
 	memcpy(buf, lg_config(desc) + offset, len);
 }



More information about the Lguest mailing list