Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754927Ab3EFQgw (ORCPT ); Mon, 6 May 2013 12:36:52 -0400 Received: from mail.datasphere.ch ([195.70.3.149]:35177 "EHLO mail.datasphere.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753525Ab3EFQgu (ORCPT ); Mon, 6 May 2013 12:36:50 -0400 X-Account-Key: account1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" FCC: imap://pm@mail.datasphere.ch/Sent X-Identity-Key: id1 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 X-MimeOLE: Produced By Microsoft Exchange V6.5 X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; DSN=0; uuencode=0 Content-class: urn:content-classes:message Subject: Re: [PATCH 1/1] Create megaraid ioctl device node Date: Mon, 6 May 2013 18:36:27 +0200 Message-ID: In-Reply-To: <87a9o86vbj.fsf@nemi.mork.no> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH 1/1] Create megaraid ioctl device node Thread-Index: Ac5Kd9sMtEuohFYiRHi0RBu9AlBUwA== References: <87a9o86vbj.fsf@nemi.mork.no> From: "Patrick Monnerat" To: =?utf-8?B?QmrDuHJuIE1vcms=?= Cc: "Neela Syam Kolli" , "James E.J. Bottomley" , , Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id r46GawR5024981 Content-Length: 912 Lines: 24 On 05/06/2013 04:23 PM, Bjørn Mork wrote: > "Patrick Monnerat" 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?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?