From d189b651ec66da4e575e5bfcba39af3f5592481a Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Sat, 15 Jul 2017 10:48:42 +0100 Subject: [PATCH] bak --- README.md | 2 ++ kernel_module/virt_to_phys.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8da6509..a91af0f 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,8 @@ However, when you do: it gets overwritten by a fresh filesystem and you lose all changes. +Using text mode is another workaround if you don't need GUI features. + ## Text mode Show serial output of QEMU directly on the current terminal, without opening a QEMU window: diff --git a/kernel_module/virt_to_phys.c b/kernel_module/virt_to_phys.c index 0a7b234..6b620fb 100644 --- a/kernel_module/virt_to_phys.c +++ b/kernel_module/virt_to_phys.c @@ -56,7 +56,7 @@ static const struct file_operations fops = { static int myinit(void) { - i = kmalloc(sizeof(loff_t), GFP_KERNEL); + i = kmalloc(sizeof(i), GFP_KERNEL); *i = 0x12345678; debugfs_file = debugfs_create_file( "lkmc_virt_to_phys", S_IRUSR, NULL, NULL, &fops);