lkml.org 
[lkml]   [2010]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: ldd scull_load question
    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 ***


    \
     
     \ /
      Last update: 2010-09-05 02:45    [W:0.022 / U:30.696 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site