lkml.org 
[lkml]   [2010]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: ldd scull_load question
From
Date
yes, you do!

there is another question confused me.
I have seem the command in the scull.c:
int scull_major = SCULL_MAJOR;and so on.

module_param(scull_major, int, S_IRUGO); and so on.

if we don't do "./scull_load scull_major" command.

we just use "./scull_load"

it will make scull_major = SCULL_MAJOR default?

在 2010-09-04六的 17:43 -0700,Randy Dunlap写道:
> On Sun, 05 Sep 2010 08:35:14 +0800 runcoderen wrote:
>
> > hi all:
> > I am reading ldd(3rd).
> > when I read the scull_load part.
> > I can't understand some special sentences in the scripts as follows:
> >
> > /sbin/insmod ./$module.ko $* || exit 1
> >
> > why we add $* and || exit 1 after /sbin/insmod ./$module.ko?
> >
> > can anyone help me to understand?
>
> "$*" passes all parameters of the script to the module as module parameters.
>
> "insmod module.ko || exit 1"
>
> means "if insmod is successful (no error), then the command is finished,
> otherwise exit with an error code of 1."
>
> Does that help?
>
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***

--

/****************************************
http://runcoderen.wordpress.com
****************************************/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-09-05 03:05    [W:0.053 / U:32.552 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site