不像一般程式的command line參數,直接加在指令後面;insmod的參數格式長這樣:
insmod 變數=值 變數=值
ldd3中文版p.36有解說與範例,如
insmod howmany=10 whom="mom"
變數是在module中用module_param巨集宣告出來的。
看來用變數名稱辨別的方法,各參數順序並無意義呢。
所以要在load time指定scull的major number的作法是:
sudo ./scull_load scull_major=280
沒有留言:
張貼留言