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}
412
412
I would recommend playing around with this code:
413
413
\begin {code }
414
414
$ sudo insmod hello-5 .ko mystring="bebop" myintarray=-1
415
+ $ dmesg -t | tail -7
415
416
myshort is a short integer: 1
416
417
myint is an integer: 420
417
418
mylong is a long integer: 9999
@@ -421,9 +422,11 @@ \subsection{Passing Command Line Arguments to a Module}
421
422
got 1 arguments for myintarray.
422
423
423
424
$ sudo rmmod hello-5
425
+ $ dmesg -t | tail -1
424
426
Goodbye, world 5
425
427
426
428
$ sudo insmod hello-5 .ko mystring="supercalifragilisticexpialidocious" myintarray=-1 ,-1
429
+ $ dmesg -t | tail -7
427
430
myshort is a short integer: 1
428
431
myint is an integer: 420
429
432
mylong is a long integer: 9999
@@ -433,10 +436,11 @@ \subsection{Passing Command Line Arguments to a Module}
433
436
got 2 arguments for myintarray.
434
437
435
438
$ sudo rmmod hello-5
439
+ $ dmesg -t | tail -1
436
440
Goodbye, world 5
437
441
438
442
$ 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
440
444
\end {code}
441
445
442
446
\subsection {Modules Spanning Multiple Files}
You can’t perform that action at this time.
0 commit comments