[FE training-materials-updates] Fix kernel module code example

Michael Opdenacker michael.opdenacker at free-electrons.com
Tue Nov 15 15:02:57 CET 2016


Repository : git://git.free-electrons.com/training-materials.git
On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=9377823dc54708e61f7f9ed4a174e798331a728b

>---------------------------------------------------------------

commit 9377823dc54708e61f7f9ed4a174e798331a728b
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date:   Tue Nov 15 15:02:57 2016 +0100

    Fix kernel module code example
    
    - The downloadable code example didn't match
      what was shown in the slides
    
    - Using pr_alert() instead of pr_debug()
      Otherwise, people testing the example don't get anything
      unless debugging in enabled
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>


>---------------------------------------------------------------

9377823dc54708e61f7f9ed4a174e798331a728b
 code/hello-param/hello_param.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/code/hello-param/hello_param.c b/code/hello-param/hello_param.c
index 26667e8..29510ec 100644
--- a/code/hello-param/hello_param.c
+++ b/code/hello-param/hello_param.c
@@ -16,13 +16,13 @@ static int __init hello_init(void)
 {
     int i;
     for (i = 0; i < howmany; i++)
-    	pr_debug("(%d) Hello, %s\n", i, whom);
+	pr_alert("(%d) Hello, %s\n", i, whom);
     return 0;
 }
 
 static void __exit hello_exit(void)
 {
-    pr_debug("Goodbye, cruel %s\n", whom);
+    pr_alert("Goodbye, cruel %s\n", whom);
 }
 
 module_init(hello_init);




More information about the training-materials-updates mailing list