Re: [PATCH 1/1] Create megaraid ioctl device node

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

 



On 05/06/2013 04:23 PM, Bjørn Mork wrote:
> "Patrick Monnerat" <Patrick.Monnerat@xxxxxxxxxxxxx> 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

��.n��������+%������w��{.n�����{������ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux