Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754450Ab3EFQGW (ORCPT ); Mon, 6 May 2013 12:06:22 -0400 Received: from mail.datasphere.ch ([195.70.3.149]:35143 "EHLO mail.datasphere.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753947Ab3EFQGU (ORCPT ); Mon, 6 May 2013 12:06:20 -0400 X-Greylist: delayed 3127 seconds by postgrey-1.27 at vger.kernel.org; Mon, 06 May 2013 12:06:20 EDT Message-ID: <5187C8AB.90501@datasphere.ch> Date: Mon, 06 May 2013 17:13:47 +0200 From: Patrick Monnerat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: =?UTF-8?B?QmrDuHJuIE1vcms=?= CC: Neela Syam Kolli , "James E.J. Bottomley" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] Create megaraid ioctl device node References: <87a9o86vbj.fsf@nemi.mork.no> In-Reply-To: <87a9o86vbj.fsf@nemi.mork.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1082 Lines: 30 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 Snippets like this one appear both in open-source projects and Dell scripts. Patrick -- 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/