public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick Monnerat <pm@datasphere.ch>
To: "Bjørn Mork" <bjorn@mork.no>
Cc: Neela Syam Kolli <megaraidlinux@lsi.com>,
	"James E.J. Bottomley" <JBottomley@parallels.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Create megaraid ioctl device node
Date: Mon, 06 May 2013 17:13:47 +0200	[thread overview]
Message-ID: <5187C8AB.90501@datasphere.ch> (raw)
In-Reply-To: <87a9o86vbj.fsf@nemi.mork.no>

On 05/06/2013 04:23 PM, Bjørn Mork wrote:
> "Patrick Monnerat" <Patrick.Monnerat@datasphere.ch> writes:
>>    Create ioctl device node for megaraid_sas driver. Let this node be
>> managed by udev. Fix a typo.
>
> Or maybe just simplify it all and use a misc device instead?  See how
> this is done in e.g. drivers/scsi/mpt3sas/mpt3sas_ctl.c or
> drivers/message/fusion/mptctl.c

Yes, could be done that way, But I want to retain compatibility with 
existing shell scripts doing things like:

DEVICE=/dev/megaraid_sas_ioctl_node
DEVICENAME=megaraid_sas_ioctl
DEVICEPERM=400
MAJOR=`grep "$DEVICENAME" /proc/devices | awk '{print $1}'`

if [ -n "$MAJOR" -a ! -e "$DEVICE" ]; then
     mknod "$DEVICE" c "$MAJOR" 0
     chmod "$DEVICEPERM" "$DEVICE"
fi

Snippets like this one appear both in open-source projects and Dell scripts.

Patrick

  reply	other threads:[~2013-05-06 15:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-06 13:58 [PATCH 1/1] Create megaraid ioctl device node Patrick Monnerat
2013-05-06 14:23 ` Bjørn Mork
2013-05-06 15:13   ` Patrick Monnerat [this message]
2013-05-06 16:36   ` Patrick Monnerat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5187C8AB.90501@datasphere.ch \
    --to=pm@datasphere.ch \
    --cc=JBottomley@parallels.com \
    --cc=bjorn@mork.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=megaraidlinux@lsi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox