From: Marconi Jiang Date: Fri, 24 Sep 2021 18:03:44 +0000 (-0700) Subject: Dump the message of hello-5 explicitly (#112) X-Git-Tag: latest~93 X-Git-Url: https://www.ivnss.com/gitweb/?a=commitdiff_plain;h=a1c3cca6db90235c137ecece185af4e826186eee;p=lkmpg Dump the message of hello-5 explicitly (#112) Close #111 --- diff --git a/lkmpg.tex b/lkmpg.tex index 58a5ca2..1674787 100644 --- a/lkmpg.tex +++ b/lkmpg.tex @@ -412,6 +412,7 @@ It takes two parameters: a variable name and a free form string describing that I would recommend playing around with this code: \begin{code} $ sudo insmod hello-5.ko mystring="bebop" myintarray=-1 +$ dmesg -t | tail -7 myshort is a short integer: 1 myint is an integer: 420 mylong is a long integer: 9999 @@ -421,9 +422,11 @@ myintarray[1] = 420 got 1 arguments for myintarray. $ sudo rmmod hello-5 +$ dmesg -t | tail -1 Goodbye, world 5 $ sudo insmod hello-5.ko mystring="supercalifragilisticexpialidocious" myintarray=-1,-1 +$ dmesg -t | tail -7 myshort is a short integer: 1 myint is an integer: 420 mylong is a long integer: 9999 @@ -433,10 +436,11 @@ myintarray[1] = -1 got 2 arguments for myintarray. $ sudo rmmod hello-5 +$ dmesg -t | tail -1 Goodbye, world 5 $ sudo insmod hello-5.ko mylong=hello -hello-5.o: invalid argument syntax for mylong: 'h' +insmod: ERROR: could not insert module hello-5.ko: Invalid parameters \end{code} \subsection{Modules Spanning Multiple Files}