Startup Parameters

Startup ParametersShort Description
seriously interested in kernel programming, I recommend the list of kernel resources in. http://jungla.dit.upm.es/~jmseyas/linux/kernel/hackers-. docs.html. …

Website: cdrom.gnutemberg.org | Filesize: 602kb

Content
Chapter 6
Startup Parameters
In many of the previous examples, we had to hard-wire something into the kernel module,
such as the file name for /proc files or the major device number for the device so we
can have ioctl’s to it. This goes against the grain of the Unix, and Linux, philosophy
which is to write flexible program the user can customize.
The way to tell a program, or a kernel module, something it needs before it can start
working is by command line parameters. In the case of kernel modules, we don’t get argc
and argv-instead, we get something better. We can define global variables in the kernel
module and insmod will fill them for us.
In this kernel module, we define two of them: str1 and str2. All you need to
do is compile the kernel module and then run insmod str1=xxx str2=yyy. When
init module is called, str1 will point to the string ‘xxx’ and str2 to the string
‘yyy’.
In version 2.0 there is no type checking on these arguments . If the first character of
str1 or str2 is a digit the kernel will fill the variable…

Get the file Download here

AddThis Social Bookmark Button
Related Books:
  • Windows XP Overview, Installation, and Startup
  • Oracle 9i under RedHat Linux 8.x and 9.x - Simple Installation HOWTO
  • How to Link Tables Using SQL Named Parameters
  • OptionHunter Getting Started Guide
  • GJ Extending the Java programming language with type parameters
  • Using Smedge with After Effects
  • Programming in Oberon
  • Chapter 3. MySQL Tutorial

  • Related Searches: , , , ,



    Comments

    Leave a Reply