Passing a bigger string with space as command line to linux modules

How to pass a string for example: "Linux World" to Linux Kernel Module

In the previous post, we discussed how to pass parameters to Linux modules over command line.

https://embeddedguruji.blogspot.com/2018/12/passing-parameters-to-linux-device.html

Consider the module in the above example is "argument.ko".

If we run the following command: "insmod argument.ko name="Linux World"


We get the error "Unknown parameter 'World' ignored".

This happens because shell removes double quotes and pass it to insmod, to avoid this add a single quotes over the string.

Run the following command: "insmod argument.ko name='"Linux World"' to pass the whole string



Comments

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

PR, PN and PV Variable in Yocto