File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -412,6 +412,7 @@ \subsection{Passing Command Line Arguments to a Module}
412412I 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
415416myshort is a short integer: 1
416417myint is an integer: 420
417418mylong is a long integer: 9999
@@ -421,9 +422,11 @@ \subsection{Passing Command Line Arguments to a Module}
421422got 1 arguments for myintarray.
422423
423424$ sudo rmmod hello-5
425+ $ dmesg -t | tail -1
424426Goodbye, world 5
425427
426428$ sudo insmod hello-5 .ko mystring="supercalifragilisticexpialidocious" myintarray=-1 ,-1
429+ $ dmesg -t | tail -7
427430myshort is a short integer: 1
428431myint is an integer: 420
429432mylong is a long integer: 9999
@@ -433,10 +436,11 @@ \subsection{Passing Command Line Arguments to a Module}
433436got 2 arguments for myintarray.
434437
435438$ sudo rmmod hello-5
439+ $ dmesg -t | tail -1
436440Goodbye, 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}
You can’t perform that action at this time.
0 commit comments