Re: passing command line arguments to kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Erik Mouw wrote:


in user cde we use main( int argc,char  *argv[  ])
i should replace main with init in kernel module.

That would do the trick, but you have to reload the module to let it
run with different parameters.

Note: I have no idea what you're trying to achieve and why you would
like to run things in kernel instead of userspace, but from the
questions you asked so far on this list I get the impression that your
design is wrong and you're creating problems that wouldn't exist with a
proper design. Could you please explain what you're trying to achieve
(i.e. the ultimate goal, not the steps you're taking right now)? Maybe
we could help you with a better design.



I agree.
IIUC, if all you need is to run some test cases which involve passing the data from/to userspace, maybe you could export few sysfs from the module to the userspace and use them as the I/O facility instead of inserting/removing the module with different module parameters each time.

regards,
hinko

--
ČETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: hinko.kocevar@xxxxxxxxxxxx
Http: www.cetrtapot.si


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux