Skip to content

Commit a1c3cca

Browse files
authored
Dump the message of hello-5 explicitly (#112)
Close #111
1 parent 2389210 commit a1c3cca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lkmpg.tex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ \subsection{Passing Command Line Arguments to a Module}
412412
I would recommend playing around with this code:
413413
\begin{code}
414414
$ sudo insmod hello-5.ko mystring="bebop" myintarray=-1
415+
$ dmesg -t | tail -7
415416
myshort is a short integer: 1
416417
myint is an integer: 420
417418
mylong is a long integer: 9999
@@ -421,9 +422,11 @@ \subsection{Passing Command Line Arguments to a Module}
421422
got 1 arguments for myintarray.
422423

423424
$ sudo rmmod hello-5
425+
$ dmesg -t | tail -1
424426
Goodbye, world 5
425427

426428
$ sudo insmod hello-5.ko mystring="supercalifragilisticexpialidocious" myintarray=-1,-1
429+
$ dmesg -t | tail -7
427430
myshort is a short integer: 1
428431
myint is an integer: 420
429432
mylong is a long integer: 9999
@@ -433,10 +436,11 @@ \subsection{Passing Command Line Arguments to a Module}
433436
got 2 arguments for myintarray.
434437

435438
$ sudo rmmod hello-5
439+
$ dmesg -t | tail -1
436440
Goodbye, world 5
437441

438442
$ sudo insmod hello-5.ko mylong=hello
439-
hello-5.o: invalid argument syntax for mylong: 'h'
443+
insmod: ERROR: could not insert module hello-5.ko: Invalid parameters
440444
\end{code}
441445
442446
\subsection{Modules Spanning Multiple Files}

0 commit comments

Comments
 (0)