From owner-devfs@oss.sgi.com Tue Mar 6 14:12:26 2001 Received: by oss.sgi.com id ; Tue, 6 Mar 2001 14:12:07 -0800 Received: from mta2.cl.cam.ac.uk ([128.232.0.14]:31762 "EHLO whittlesey.cl.cam.ac.uk") by oss.sgi.com with ESMTP id ; Tue, 6 Mar 2001 14:11:58 -0800 Received: from stives.cl.cam.ac.uk ([128.232.1.203] helo=cl.cam.ac.uk ident=pb) by whittlesey.cl.cam.ac.uk with esmtp (Exim 3.092 #1) id 14aPgP-00026f-00; Tue, 06 Mar 2001 22:11:53 +0000 X-Mailer: exmh version 2.3.1+CL 01/18/2001 with nmh-1.0 To: devfs@oss.sgi.com cc: Piete.Brooks@cl.cam.ac.uk Subject: Newbie questions: Auto creating devices ? X-uri: X-face: &@N3QE9h|>f`igFCkZ'a1`z=nNLXb}k>H(79G"V?@!&*yn)uhPBctF1vc}LD'{OA%$bs X+l[wN,I^G8kKj2NFxQrr@1C4QBC]hq5-%ZkV,^Zl/qE<0`zCQ1nM+]-N<^WG[H)]?d) A:L9AFgOU[BjbaY)uBAMz}h!fm^O0# Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 06 Mar 2001 22:11:53 +0000 From: Piete Brooks Message-Id: Sender: owner-devfs@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;devfs-outgoing After several years of `looking at' devfs, I've finally bitten the bullet and I'm running Redhat 7.0.91 with Linux 2.4.2 with devfs enabled. It mostly works, but there are a few remaining problems. I've read http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html and am none the wiser. I'm not sure what `man devfsd' means by "old compatibility entries" and "new compatibility entries". Are there other docs out there ? Are there any sample config files I can look at ? I was assuming that there would be something I could put in devfsd.conf to say `create a link from /dev/mouse to ttys/0' (I know some people don't like /dev/mouse, but we use it!), rather than having use the tarball approach. Can this be done ? The latest problem is that in the old world, when a user tried to open /dev/audio, kmod loaded the driver and it all worked. Now there is no /dev/audio to trigger kmod, and just attempting to open the name /dev/audio doesn't work. Manually doing a modprobe works and causes /dev/audio to appear, but with the wrong modes -- likewise /dev/cdroms/ is drw------- and even the `owner' can't access /dev/cdrom How should it all work ? From owner-devfs@oss.sgi.com Tue Mar 6 19:10:39 2001 Received: by oss.sgi.com id ; Tue, 6 Mar 2001 19:10:19 -0800 Received: from [200.222.195.249] ([200.222.195.249]:20353 "EHLO pervalidus.dyndns.org") by oss.sgi.com with ESMTP id ; Tue, 6 Mar 2001 19:10:13 -0800 Received: from pervalidus by pervalidus.dyndns.org with local (Exim 3.22 #1) id 14aUJG-00008Z-00; Wed, 07 Mar 2001 00:08:18 -0300 Date: Wed, 7 Mar 2001 00:08:18 -0300 From: =?iso-8859-1?B?RnLpZOlyaWMgTC4gVy4=?= Meunier <0@pervalidus.net> To: Richard Gooch Cc: devfs@oss.sgi.com Subject: Re: /etc/securetty problem Message-ID: <20010307000818.F103@pervalidus> References: <20010202000527.I160@pervalidus.dyndns.org> <200102142115.f1ELFVV00392@mobilix.ras.ucalgary.ca> <20010216030017.X1922@pervalidus.dyndns.org> <200102171835.f1HIZ9n12590@mobilix.atnf.CSIRO.AU> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.3.16i In-Reply-To: <200102171835.f1HIZ9n12590@mobilix.atnf.CSIRO.AU>; from rgooch@ras.ucalgary.ca on Sun, Feb 18, 2001 at 05:35:09AM +1100 X-Mailer: Mutt/1.3.16i - Linux 2.4.2 X-URL: http://www.pervalidus.net/ Sender: owner-devfs@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;devfs-outgoing Strange. After a reboot I was able to log in without any changes to shadow, and using vc/* in both /etc/inittab and /etc/securetty. I can log in as root and as a normal user. For some reason it didn't work in my only boot with 2.4.1, but I don't know why. Maybe because I mounted devfs after booting (I forgot to edit my sysinit script) and started devfsd just after ? I don't know if it's a problem to mount devfs after you log in, but it worked. What didn't work was pppd logging. init 1 -> init 3 wouldn't change the login problem, but fixed pppd. Hopefully shadow seems to be devfs aware. On Sun, Feb 18, 2001 at 05:35:09AM +1100, Richard Gooch wrote: > 0@pervalidus.net writes: > > Hi Richard. > > > > On Thu, Feb 15, 2001 at 08:15:31AM +1100, Richard Gooch wrote: > > > 0@pervalidus.net writes: > > > > Hi. For the first time I installed devfs (Kernel 2.4.1). It's > > > > working without any major problems, but I can't log as root on > > > > any console if I change /etc/securetty to use vc/1 (I also > > > > tried with 1) instead of tty1. > > > > > > Check the FAQ. It talks about enabling root logins at the console. > > > > I checked both Documentation/filesystems/devfs/README and > > http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html > > > > Are you talking about > > http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html#quick-start, > > the 'System Libraries ... /etc/securetty' part? > > Yes. > > > I use glibc 2.2.2 but don't have Linux-PAM installed > > (Slackware uses shadow). I can use agetty from util-linux > > without any problems (I set /etc/inittab to use vc/1 -> vc/4). > > The problem is login. I can't use the one from util-linux > > because it needs PAM. I have to use all authentication > > programs from shadow. > > OK. So it looks like shadow is broken. > > > If I set /etc/securetty to use 1 or vc/1 root can't log in. > > It works if I use tty1. > > So perhaps the shadow code is hard-wired to use tty#, or perhaps it's > broken the same way other code was and assumes that the devices are in > /dev and not a subdirectory of /dev. > > > The problem seems to be with login from shadow. I'd appreciate > > any reports from Slackware users. Unfortunately, I think 99% > > are using a distribution with PAM. > > > > My system: > > > > Linux Kernel 2.4.1 on x86 > > shadow-20000902: login > > util-linux-2.10s: agetty > > Can you please check through the shadow code to find out what's going > wrong, and then send a patch to the shadow maintainer? Let me know if > there are any workarounds (or fixed versions of shadow that can be > installed), so I can update the FAQ. -- 0@pervalidus.{net, {dyndns.}org} Tel: 55-21-717-2399 (Niterói-RJ BR) From owner-devfs@oss.sgi.com Tue Mar 13 14:31:01 2001 Received: by oss.sgi.com id ; Tue, 13 Mar 2001 14:30:52 -0800 Received: from mta2.cl.cam.ac.uk ([128.232.0.14]:33802 "EHLO whittlesey.cl.cam.ac.uk") by oss.sgi.com with ESMTP id ; Tue, 13 Mar 2001 14:30:37 -0800 Received: from stives.cl.cam.ac.uk ([128.232.1.203] helo=cl.cam.ac.uk ident=pb) by whittlesey.cl.cam.ac.uk with esmtp (Exim 3.092 #1) id 14cxJI-0000dM-00; Tue, 13 Mar 2001 22:30:32 +0000 X-Mailer: exmh version 2.3.1+CL 01/18/2001 with nmh-1.0 To: devfs@oss.sgi.com cc: Piete.Brooks@cl.cam.ac.uk Subject: Re: Newbie questions: Auto creating devices ? X-uri: X-face: &@N3QE9h|>f`igFCkZ'a1`z=nNLXb}k>H(79G"V?@!&*yn)uhPBctF1vc}LD'{OA%$bs X+l[wN,I^G8kKj2NFxQrr@1C4QBC]hq5-%ZkV,^Zl/qE<0`zCQ1nM+]-N<^WG[H)]?d) A:L9AFgOU[BjbaY)uBAMz}h!fm^O0# Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 13 Mar 2001 22:30:32 +0000 From: Piete Brooks Message-Id: Sender: owner-devfs@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;devfs-outgoing I've not received any replies to my earlier email :-( I've got further problems trying to access a SCSI tape changer. I need to modprobe st and sg to make the devices appear. This is fine for a while, but the user reports that the devices `disappear'. I assume others must have this working properly -- can they send me details of how to configure it ? Ta. ======================== previous message =================================== Date: Tue, 06 Mar 2001 22:11:53 +0000 After several years of `looking at' devfs, I've finally bitten the bullet and I'm running Redhat 7.0.91 with Linux 2.4.2 with devfs enabled. It mostly works, but there are a few remaining problems. I've read http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html and am none the wiser. I'm not sure what `man devfsd' means by "old compatibility entries" and "new compatibility entries". Are there other docs out there ? Are there any sample config files I can look at ? I was assuming that there would be something I could put in devfsd.conf to say `create a link from /dev/mouse to ttys/0' (I know some people don't like /dev/mouse, but we use it!), rather than having use the tarball approach. Can this be done ? The latest problem is that in the old world, when a user tried to open /dev/audio, kmod loaded the driver and it all worked. Now there is no /dev/audio to trigger kmod, and just attempting to open the name /dev/audio doesn't work. Manually doing a modprobe works and causes /dev/audio to appear, but with the wrong modes -- likewise /dev/cdroms/ is drw------- and even the `owner' can't access /dev/cdrom How should it all work ? From owner-devfs@oss.sgi.com Sun Mar 18 20:34:32 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2J4YWQ23627 for devfs-outgoing; Sun, 18 Mar 2001 20:34:32 -0800 Received: from argo.anu.edu.au (postfix@argo.anu.edu.au [150.203.5.57]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2J4YTM23623 for ; Sun, 18 Mar 2001 20:34:29 -0800 Received: by argo.anu.edu.au (Postfix, from userid 9363) id F12E16F300; Mon, 19 Mar 2001 15:34:27 +1100 (EST) Date: Mon, 19 Mar 2001 15:34:27 +1100 (EST) To: devfs@oss.sgi.com Subject: Mingetty problems (fwd) From: "Roger W.Brown" X-Mailer: Ishmail 2.0.0-20001230-i686-Bregor-linux-gnu MIME-Version: 1.0 Content-Type: text/plain Message-Id: <20010319043427.F12E16F300@argo.anu.edu.au> Sender: owner-devfs@oss.sgi.com Precedence: bulk Hi, I'm new to devfsd, I'm still learning. My immediate problem is that I can't use mingetty, in place of agetty, in my initial init boot scripts. At this point I should add that my Linux system began with linux-0.9.something_very_young and has been matained by hand ever since. RedHaT, SuSE, Mandrake etc, are not known at this address. ( Though, that does not mean that I know what I'm doing !) Never the less, all system software is built from current sources. (e.g. linux-2.4.2-ac20, glibc-2.2.2, binutils-2.10.91.0.4). I made a minor change to the relevent part of the mingetty code, to reflect modern device designations. The code now reads: /* open_tty - set up tty as standard { input, output, error } */ static void open_tty (void) { struct sigaction sa; char buf[20]; int fd; /* Reset permissions on the console device */ if (strncmp(tty, "tty", 3) == 0) { strcpy (buf, "/dev/vcc/"); strcat (buf, &tty[3]); if (chown (buf, 0, 3) || chmod (buf, 0600)) error ("%s: %s", buf, sys_errlist[errno]); strcpy (buf, "/dev/vcc/a"); strcat (buf, &tty[3]); if (chown (buf, 0, 3) || chmod (buf, 0600)) error ("%s: %s", buf, sys_errlist[errno]); } The relevant section of /etc/inittab is: c1:1235:respawn:/sbin/mingetty tty1 c2:1235:respawn:/sbin/mingetty tty2 c3:5:respawn:/sbin/mingetty tty3 c4:5:respawn:/sbin/mingetty tty4 c5:5:respawn:/sbin/mingetty tty5 c6:45:respawn:/sbin/mingetty tty6 On booting, this fails with messages: Mar 17 17:37:20 argo /sbin/mingetty[137]: /dev/vcc/2: No such file or directory Mar 17 17:37:20 argo /sbin/mingetty[138]: /dev/vcc/3: No such file or directory Mar 17 17:37:20 argo /sbin/mingetty[140]: /dev/vcc/5: No such file or directory Mar 17 17:37:20 argo /sbin/mingetty[142]: /dev/vcc/6: No such file or directory Mar 17 17:37:20 argo /sbin/mingetty[139]: /dev/vcc/4: No such file or directory and many more similar remarks. This can be "fixed" by adding extra lines to the boot scripts: # devfs started. /sbin/devfsd /dev /sbin/mknod /dev/vcc/2 c 7 2 /sbin/mknod /dev/vcc/3 c 7 3 /sbin/mknod /dev/vcc/4 c 7 4 /sbin/mknod /dev/vcc/5 c 7 5 /sbin/mknod /dev/vcc/6 c 7 6 /sbin/mknod /dev/vcc/a2 c 7 130 /sbin/mknod /dev/vcc/a3 c 7 131 /sbin/mknod /dev/vcc/a4 c 7 132 /sbin/mknod /dev/vcc/a5 c 7 133 /sbin/mknod /dev/vcc/a6 c 7 134 The system then boots, but I still have ugly blemishes in the syslog file: Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcs3" No such file or directory Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcsa3" No such file or directory Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcs2" No such file or directory Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcsa2" No such file or directory Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcs5" No such file or directory Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcsa5" No such file or directory Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcs6" No such file or directory Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcsa6" No such file or directory Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcs4" No such file or directory Mar 17 18:37:16 argo devfsd[13]: action_compat: error unlinking: "vcsa4" No such file or directory My guess is that I should also create symbolic links for vcs3, vcsa3 etc, but perhaps it's time to ask the experts. Any advice will be most welcome. Roger Brown From owner-devfs@oss.sgi.com Sun Mar 18 22:09:33 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2J69XG25113 for devfs-outgoing; Sun, 18 Mar 2001 22:09:33 -0800 Received: from argo.anu.edu.au (postfix@argo.anu.edu.au [150.203.5.57]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2J69VM25110 for ; Sun, 18 Mar 2001 22:09:32 -0800 Received: by argo.anu.edu.au (Postfix, from userid 9363) id B4D196F300; Mon, 19 Mar 2001 17:09:29 +1100 (EST) Date: Mon, 19 Mar 2001 17:09:29 +1100 (EST) To: devfs@oss.sgi.com Subject: Re: Mingetty problems (fwd) From: "Roger W.Brown" X-Mailer: Ishmail 2.0.0-20001230-i686-Bregor-linux-gnu MIME-Version: 1.0 Content-Type: text/plain Message-Id: <20010319060929.B4D196F300@argo.anu.edu.au> Sender: owner-devfs@oss.sgi.com Precedence: bulk Well, I can answer my own question. Nothing like sending a question to an Email-list, to clear the mind and reveal the blindingly obvious. It seems that I was confused between vc and vcc. That leaves only one question: What is the preferred way for mingetty to determine if devfsd is active ? Yours in foolishness, Roger Brown From owner-devfs@oss.sgi.com Mon Mar 19 09:04:54 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2JH4sp03191 for devfs-outgoing; Mon, 19 Mar 2001 09:04:54 -0800 Received: from deliverator.sgi.com (deliverator.sgi.com [204.94.214.10]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2JH4rM03188 for ; Mon, 19 Mar 2001 09:04:53 -0800 Received: from cthulhu.engr.sgi.com (gate3-relay.engr.sgi.com [130.62.1.234]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id JAA28802 for ; Mon, 19 Mar 2001 09:03:41 -0800 (PST) mail_from (tduffy@engr.sgi.com) Received: from dbear.engr.sgi.com (dbear.engr.sgi.com [163.154.18.85]) by cthulhu.engr.sgi.com (SGI-8.9.3/8.9.3) with ESMTP id JAA22446; Mon, 19 Mar 2001 09:03:35 -0800 (PST) Date: Mon, 19 Mar 2001 08:59:42 -0800 (PST) From: Tom Duffy To: "Roger W.Brown" cc: Subject: Re: Mingetty problems (fwd) In-Reply-To: <20010319060929.B4D196F300@argo.anu.edu.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-devfs@oss.sgi.com Precedence: bulk I would check to see if /dev/.devfsd is around. -tduffy On Mon, 19 Mar 2001, Roger W.Brown wrote: > > Well, I can answer my own question. Nothing like sending > a question to an Email-list, to clear the mind and reveal > the blindingly obvious. > > It seems that I was confused between vc and vcc. > > That leaves only one question: What is the preferred way > for mingetty to determine if devfsd is active ? > > Yours in foolishness, > > Roger Brown > From owner-devfs@oss.sgi.com Mon Mar 19 09:14:30 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2JHEUu03391 for devfs-outgoing; Mon, 19 Mar 2001 09:14:30 -0800 Received: from electre.pasteur.fr (electre.pasteur.fr [157.99.64.120]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2JHEPM03386 for ; Mon, 19 Mar 2001 09:14:26 -0800 Received: from Baldrick (dial-ip-72.dial.pasteur.fr [157.99.10.72]) by electre.pasteur.fr (8.11.3/8.11.3) with ESMTP id f2JHDeQ452821; Mon, 19 Mar 2001 18:13:46 +0100 (CET) Received: from duncan by Baldrick with local (Exim 3.22 #1 (Debian)) id 14f39U-00016z-00; Mon, 19 Mar 2001 18:09:04 +0100 Date: Mon, 19 Mar 2001 18:09:03 +0100 To: hpa@zytor.com Cc: devfs@oss.sgi.com Subject: [PATCH] port of cpuid to devfs Message-ID: <20010319180903.A4263@Baldrick> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i From: Duncan Sands Sender: owner-devfs@oss.sgi.com Precedence: bulk I ported cpuid for kernel version 2.4.2 to devfs. It now creates the /dev/cpu/%d/cpuid devices. The changes are straightforward. Duncan Sands. --- arch/i386/kernel/cpuid.c.orig Mon Mar 19 17:57:24 2001 +++ arch/i386/kernel/cpuid.c Mon Mar 19 16:13:14 2001 @@ -35,12 +35,15 @@ #include #include #include +#include #include #include #include #include +static devfs_handle_t dir_handle; /* For the directory */ + #ifdef CONFIG_SMP struct cpuid_command { @@ -142,18 +145,38 @@ int __init cpuid_init(void) { - if (register_chrdev(CPUID_MAJOR, "cpu/cpuid", &cpuid_fops)) { + if (devfs_register_chrdev(CPUID_MAJOR, "cpu/cpuid", &cpuid_fops)) { printk(KERN_ERR "cpuid: unable to get major %d for cpuid\n", CPUID_MAJOR); return -EBUSY; } + dir_handle = devfs_mk_dir(NULL, "cpu", NULL); + devfs_register_series(dir_handle, "%u/cpuid", smp_num_cpus, DEVFS_FL_DEFAULT, + CPUID_MAJOR, 0, + S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, + &cpuid_fops, NULL); + return 0; } void __exit cpuid_exit(void) { - unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); + char devname[16]; + devfs_handle_t handle; + unsigned int minor; + +#ifdef CONFIG_DEVFS_FS + for (minor=0; minor < smp_num_cpus; ++minor) + { + sprintf(devname, "%u/cpuid", minor); + handle = devfs_find_handle(dir_handle, devname, CPUID_MAJOR, minor, + DEVFS_SPECIAL_CHR, 0); + devfs_unregister(handle); + } +#endif /* CONFIG_DEVFS_FS */ + + devfs_unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); } module_init(cpuid_init); From owner-devfs@oss.sgi.com Mon Mar 19 09:14:53 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2JHErS03431 for devfs-outgoing; Mon, 19 Mar 2001 09:14:53 -0800 Received: from electre.pasteur.fr (electre.pasteur.fr [157.99.64.120]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2JHEPM03385 for ; Mon, 19 Mar 2001 09:14:34 -0800 Received: from Baldrick (dial-ip-72.dial.pasteur.fr [157.99.10.72]) by electre.pasteur.fr (8.11.3/8.11.3) with ESMTP id f2JHDrQ451649; Mon, 19 Mar 2001 18:13:53 +0100 (CET) Received: from duncan by Baldrick with local (Exim 3.22 #1 (Debian)) id 14f3D1-00017E-00; Mon, 19 Mar 2001 18:12:43 +0100 Date: Mon, 19 Mar 2001 18:12:43 +0100 To: hpa@zytor.com Cc: devfs@oss.sgi.com Subject: [PATCH] port of msr to devfs Message-ID: <20010319181243.A4285@Baldrick> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i From: Duncan Sands Sender: owner-devfs@oss.sgi.com Precedence: bulk I ported msr for kernel version 2.4.2 to devfs. It now creates the /dev/cpu/%d/msr devices. The changes are straightforward. Duncan Sands. --- arch/i386/kernel/msr.c.orig Mon Mar 19 18:10:12 2001 +++ arch/i386/kernel/msr.c Mon Mar 19 16:13:17 2001 @@ -34,12 +34,15 @@ #include #include #include +#include #include #include #include #include +static devfs_handle_t dir_handle; /* For the directory */ + /* Note: "err" is handled in a funny way below. Otherwise one version of gcc or another breaks. */ @@ -250,18 +253,37 @@ int __init msr_init(void) { - if (register_chrdev(MSR_MAJOR, "cpu/msr", &msr_fops)) { + if (devfs_register_chrdev(MSR_MAJOR, "cpu/msr", &msr_fops)) { printk(KERN_ERR "msr: unable to get major %d for msr\n", MSR_MAJOR); return -EBUSY; } + dir_handle = devfs_mk_dir(NULL, "cpu", NULL); + devfs_register_series (dir_handle, "%u/msr", smp_num_cpus, DEVFS_FL_DEFAULT, + MSR_MAJOR, 0, S_IFCHR | S_IRUSR | S_IWUSR | + S_IRGRP | S_IROTH, &msr_fops, NULL); + return 0; } void __exit msr_exit(void) { - unregister_chrdev(MSR_MAJOR, "cpu/msr"); + char devname[16]; + devfs_handle_t handle; + unsigned int minor; + +#ifdef CONFIG_DEVFS_FS + for (minor=0; minor < smp_num_cpus; ++minor) + { + sprintf (devname, "%u/msr", minor); + handle = devfs_find_handle(dir_handle, devname, MSR_MAJOR, minor, + DEVFS_SPECIAL_CHR, 0); + devfs_unregister(handle); + } +#endif /* CONFIG_DEVFS_FS */ + + devfs_unregister_chrdev(MSR_MAJOR, "cpu/msr"); } module_init(msr_init); From owner-devfs@oss.sgi.com Thu Mar 22 05:18:37 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2MDIbi30446 for devfs-outgoing; Thu, 22 Mar 2001 05:18:37 -0800 Received: from iaeste-catalunya.upc.es (iaeste-catalunya.upc.es [147.83.55.111]) by oss.sgi.com (8.11.3/8.11.3) with SMTP id f2MDIaM30443 for ; Thu, 22 Mar 2001 05:18:37 -0800 Received: (qmail 3674 invoked by uid 3); 22 Mar 2001 13:11:35 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 22 Mar 2001 13:11:35 -0000 Date: Thu, 22 Mar 2001 14:11:35 +0100 (CET) From: Joan Picanyol i Puig To: devfs@oss.sgi.com Subject: SCSI emulation? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-devfs@oss.sgi.com Precedence: bulk Hi, Here's what I'm trying to accomplish: I have a SCSI CD-RW drive, and an ATAPI CD-ROM drive. The CD-recording software uses SCSI emulation for ATAPI devices, and I had it set up using the normal /dev tree. However, I cannot get it to work under devfs. I really don't know where to start. Any hints? Thks From owner-devfs@oss.sgi.com Thu Mar 22 21:14:52 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2N5EqC21343 for devfs-outgoing; Thu, 22 Mar 2001 21:14:52 -0800 Received: from web8002.mail.in.yahoo.com (web8002.in.yahoo.com [203.199.70.20]) by oss.sgi.com (8.11.3/8.11.3) with SMTP id f2N5EoM21338 for ; Thu, 22 Mar 2001 21:14:50 -0800 Message-ID: <20010323052126.9205.qmail@web8002.mail.in.yahoo.com> Received: from [203.197.143.2] by web8002.mail.in.yahoo.com; Fri, 23 Mar 2001 05:21:26 GMT Date: Fri, 23 Mar 2001 05:21:26 +0000 (GMT) From: =?iso-8859-1?q?Karthikeyan=20Nagaraj?= Subject: doubt about devices To: devfs@oss.sgi.com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-devfs@oss.sgi.com Precedence: bulk Hello, i need some details about how to retrive the information about the various devices available in my system.i would like to know the device status & whether the device is currently available or not using system calls. the devices i need about are : * keyboard * co processor * mouse * network * compact disc * floppy disc * RAM disk * serial port * parallel port * processor * modem * tape * clock kindly,let me know the details about the above mentioned devices as soon as possible Thanks ____________________________________________________________ Do You Yahoo!? For regular News updates go to http://in.news.yahoo.com From owner-devfs@oss.sgi.com Sat Mar 24 10:27:18 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2OIRIT32570 for devfs-outgoing; Sat, 24 Mar 2001 10:27:18 -0800 Received: from out-mx1.crosswinds.net (out-mx1.crosswinds.net [209.208.163.38]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2OIRDM32565 for ; Sat, 24 Mar 2001 10:27:14 -0800 Received: from member-mx1.crosswinds.net (member-mx1.crosswinds.net [209.208.163.43]) by out-mx1.crosswinds.net (Postfix) with ESMTP id 244A05D601; Sat, 24 Mar 2001 13:27:08 -0500 (EST) Received: from hobbes (umd75-167.d.umn.edu [131.212.75.167]) by member-mx1.crosswinds.net (Postfix) with ESMTP id 6D6BD4CB99; Sat, 24 Mar 2001 13:26:59 -0500 (EST) Received: from bbock by hobbes with local (Exim 3.14 #1 (Debian)) id 14gskY-0000NB-00; Sat, 24 Mar 2001 12:26:54 -0600 Date: Sat, 24 Mar 2001 12:26:54 -0600 From: Brian Bock To: Joan Picanyol i Puig Cc: devfs@oss.sgi.com Subject: Re: SCSI emulation? Message-ID: <20010324122654.A1395@hobbes.d.umn.edu> Mail-Followup-To: Joan Picanyol i Puig , devfs@oss.sgi.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from joan@iaeste-catalunya.upc.es on Thu, Mar 22, 2001 at 02:11:35PM +0100 Sender: owner-devfs@oss.sgi.com Precedence: bulk * Joan Picanyol i Puig (joan@iaeste-catalunya.upc.es) [010322 07:30]: > Hi, > > Here's what I'm trying to accomplish: > > I have a SCSI CD-RW drive, and an ATAPI CD-ROM drive. The CD-recording software > uses SCSI emulation for ATAPI devices, and I had it set up using the normal /dev > tree. However, I cannot get it to work under devfs. > > I really don't know where to start. Any hints? > > Thks The cdroms should show up under /dev/cdroms if you're running devfsd. Also, they should be availiable in the /dev/scsi/ heirarchy. --Brian Bock pluribusunum@crosswinds.net From owner-devfs@oss.sgi.com Sat Mar 24 10:59:16 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2OIxGf00889 for devfs-outgoing; Sat, 24 Mar 2001 10:59:16 -0800 Received: from server.ambigc.com (ns1.ambigc.com [64.6.243.2]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2OIxFM00886 for ; Sat, 24 Mar 2001 10:59:15 -0800 Received: from SNARF (mcns31.docsis86.singa.pore.net [::ffff:202.156.86.31]) (AUTH: LOGIN chris@ambigc.com, TLS) by server.ambigc.com with esmtp; Sat, 24 Mar 2001 01:53:06 -0500 Message-ID: <007d01c0b495$47637100$0c0a0a0a@SNARF> From: "Chris Hamilton" To: "Joan Picanyol i Puig" Cc: devfs@oss.sgi.com References: <20010324122654.A1395@hobbes.d.umn.edu> Subject: Re: SCSI emulation? Date: Sun, 25 Mar 2001 03:04:34 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-devfs@oss.sgi.com Precedence: bulk CD-RWs will not be in the /dev/cdroms for CD-RW write access only as a regular CD-ROM. Write access is still through the generic scsi driver which can be found by following your devices connection paths through /dev/scsi. It would be something like /dev/scsi/host0/bus0/target0/lun0/generic if the CD-RW was on your first host card, first bus, and the first scsi id. If your CD-RW is really a scsi, it shouldn't matter about emulation compatibilities. I personally haven't seen an IDE CD-RW on devfs, but I would assume that once scsi emulation was configured it would be found inside the /dev/ide tree similar to /dev/scsi. For cdrecord for example, to burn a cd you just call: cdrecord dev=/dev/scsi/host0/bus0/target0/lun0/generic speed=[whatever] isoimage Of course most burning programs have a config file that you can set the default device to once you have located it and that would be the recommended solution. Chris Hamilton rocklinux ----- Original Message ----- From: "Brian Bock" To: "Joan Picanyol i Puig" Cc: Sent: Sunday, March 25, 2001 2:26 AM Subject: Re: SCSI emulation? > * Joan Picanyol i Puig (joan@iaeste-catalunya.upc.es) [010322 07:30]: > > Hi, > > > > Here's what I'm trying to accomplish: > > > > I have a SCSI CD-RW drive, and an ATAPI CD-ROM drive. The CD-recording software > > uses SCSI emulation for ATAPI devices, and I had it set up using the normal /dev > > tree. However, I cannot get it to work under devfs. > > > > I really don't know where to start. Any hints? > > > > Thks > > The cdroms should show up under /dev/cdroms if you're running devfsd. > Also, they should be availiable in the /dev/scsi/ heirarchy. > > --Brian Bock > pluribusunum@crosswinds.net > From owner-devfs@oss.sgi.com Wed Mar 28 00:31:51 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2S8Vp129959 for devfs-outgoing; Wed, 28 Mar 2001 00:31:51 -0800 Received: from vindaloo.ras.ucalgary.ca (vindaloo.ras.ucalgary.ca [136.159.55.21]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2S8VoM29956 for ; Wed, 28 Mar 2001 00:31:50 -0800 Received: (from rgooch@localhost) by vindaloo.ras.ucalgary.ca (8.10.0/8.10.0) id f2S8U5X26714; Wed, 28 Mar 2001 01:30:05 -0700 Date: Wed, 28 Mar 2001 01:30:05 -0700 Message-Id: <200103280830.f2S8U5X26714@vindaloo.ras.ucalgary.ca> From: Richard Gooch To: linux-kernel@vger.kernel.org, devfs-announce-list@vindaloo.ras.ucalgary.ca Subject: [PATCH] devfs v99.20 available Sender: owner-devfs@oss.sgi.com Precedence: bulk Hi, all. Version 99.20 of my devfs patch is now available from: http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html The devfs FAQ is also available here. Patch directly available from: ftp://ftp.??.kernel.org/pub/linux/kernel/people/rgooch/v2.2/devfs-patch-current.gz AND: ftp://ftp.atnf.csiro.au/pub/people/rgooch/linux/kernel-patches/v2.2/devfs-patch-current.gz NOTE: the devfs-patch-v99.x patches are maintenance patches for the 2.2.x production kernels. Devfs development is done against recent development kernels. Occasionally, the latest devfs patch for the development kernels may be backported to 2.2.x series, but this happens rarely. This is against 2.2.19. Highlights of this release: - Ported devfs-patch-v99.19 to kernel 2.2.19 - Updated README from master HTML file Regards, Richard.... Permanent: rgooch@atnf.csiro.au Current: rgooch@ras.ucalgary.ca From owner-devfs@oss.sgi.com Wed Mar 28 21:13:10 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2T5DAf24253 for devfs-outgoing; Wed, 28 Mar 2001 21:13:10 -0800 Received: from mail12.svr.pol.co.uk (mail12.svr.pol.co.uk [195.92.193.215]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2T5D9M24250 for ; Wed, 28 Mar 2001 21:13:10 -0800 Received: from modem-251.fu-manchu-lion-fish.dialup.pol.co.uk ([62.136.215.251]) by mail12.svr.pol.co.uk with esmtp (Exim 3.13 #0) id 14iUk8-0007Py-00 for devfs@oss.sgi.com; Thu, 29 Mar 2001 06:13:09 +0100 Date: Thu, 29 Mar 2001 06:15:53 +0100 (BST) From: Will Newton X-X-Sender: To: Subject: pty perms Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-devfs@oss.sgi.com Precedence: bulk I am using the config that comes with devfs to handle permissions over reboots. Unfortunately I have a problem with saving pty permissions. Basically if I (me, the user) open a pty it adds an entry in /dev-state/pty: crw------- 1 will will 136, 2 Mar 29 05:53 1 This is OK if I am the only user on the machine (which I usually am), but when another user comes to use the machine: crw--w---- 1 root tty 136, 7 Mar 29 06:13 2 And so on. Next user logs in "Permission denied". What is my way out of this? From owner-devfs@oss.sgi.com Thu Mar 29 23:21:17 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2U7LHd23574 for devfs-outgoing; Thu, 29 Mar 2001 23:21:17 -0800 Received: from mobilix.atnf.CSIRO.AU ([209.125.249.77]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2U7LDM23571 for ; Thu, 29 Mar 2001 23:21:13 -0800 Received: (from rgooch@localhost) by mobilix.ras.ucalgary.ca (8.10.0/8.10.0) id f2TIF6k00398; Thu, 29 Mar 2001 11:15:06 -0700 Date: Thu, 29 Mar 2001 11:15:06 -0700 Message-Id: <200103291815.f2TIF6k00398@mobilix.ras.ucalgary.ca> From: Richard Gooch To: Will Newton Cc: Subject: Re: pty perms In-Reply-To: References: Sender: owner-devfs@oss.sgi.com Precedence: bulk Will Newton writes: > > I am using the config that comes with devfs to handle permissions over > reboots. Unfortunately I have a problem with saving pty permissions. > > Basically if I (me, the user) open a pty it adds an entry in > /dev-state/pty: > > crw------- 1 will will 136, 2 Mar 29 05:53 1 > > This is OK if I am the only user on the machine (which I usually am), but > when another user comes to use the machine: > > crw--w---- 1 root tty 136, 7 Mar 29 06:13 2 > > And so on. Next user logs in "Permission denied". That's what the IGNORE action is for. I've updated the sample devfsd.conf file to give this hint. Here's the relevant portion: REGISTER ^pt[sy]/.* IGNORE CHANGE ^pt[sy]/.* IGNORE REGISTER ^pt[sy]/.* IGNORE REGISTER .* COPY /dev-state/$devname $devpath CHANGE .* COPY $devpath /dev-state/$devname CREATE .* COPY $devpath /dev-state/$devname If this doesn't work, then let me know. Regards, Richard.... Permanent: rgooch@atnf.csiro.au Current: rgooch@ras.ucalgary.ca From owner-devfs@oss.sgi.com Thu Mar 29 23:26:28 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2U7QSM23738 for devfs-outgoing; Thu, 29 Mar 2001 23:26:28 -0800 Received: from mobilix.atnf.CSIRO.AU ([209.125.249.77]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2U7QRM23735 for ; Thu, 29 Mar 2001 23:26:27 -0800 Received: (from rgooch@localhost) by mobilix.ras.ucalgary.ca (8.10.0/8.10.0) id f2U1ST800539; Thu, 29 Mar 2001 18:28:29 -0700 Date: Thu, 29 Mar 2001 18:28:29 -0700 Message-Id: <200103300128.f2U1ST800539@mobilix.ras.ucalgary.ca> From: Richard Gooch To: Brian Rossmeisl Cc: devfs@oss.sgi.com Subject: Re: [Re: [Re: [Re: devfs and PCMCIA scripts]]] In-Reply-To: <20010121025728.9730.qmail@nwcst282.netaddress.usa.net> References: <20010121025728.9730.qmail@nwcst282.netaddress.usa.net> Sender: owner-devfs@oss.sgi.com Precedence: bulk Brian Rossmeisl writes: > Hmm, > I dunno, maybe Richard Gooch might be able to help us out on this one. > > corleyja@hushmail.com wrote: > > > > No, but /dev-state and /dev are bound at bootup so they contain the same > > devices at any given time. Is this method even recommended anymore? I've > > added the following lines into my /etc/rc.d/rc.sysinit script as per Richard > > > Gooch's homepage on devfs: > > /bin/mount --bind /dev /dev-state > > /bin/mount -t devfs none /dev > > /sbin/devfsd /dev > > I did this in order to preserve permissions across reboots, which it does. > > It just doesn't keep devices I've created in /dev. I know. It's on my ToDo list. The COPY action is only useful for device nodes that are created via the devfs API (i.e. by drivers), since actions are taken in response to events. Since there isn't an event per entry in the /dev-state database, devfsd can't restore everything that's in the database. Blindly generating fake events for every entry in the database isn't the solution either. A more subtle approach is required. I've got something in mind, so hang on. Regards, Richard.... Permanent: rgooch@atnf.csiro.au Current: rgooch@ras.ucalgary.ca From owner-devfs@oss.sgi.com Thu Mar 29 23:26:39 2001 Received: (from majordomo@localhost) by oss.sgi.com (8.11.3/8.11.3) id f2U7Qdr23774 for devfs-outgoing; Thu, 29 Mar 2001 23:26:39 -0800 Received: from mobilix.atnf.CSIRO.AU ([209.125.249.77]) by oss.sgi.com (8.11.3/8.11.3) with ESMTP id f2U7QdM23770 for ; Thu, 29 Mar 2001 23:26:39 -0800 Received: (from rgooch@localhost) by mobilix.ras.ucalgary.ca (8.10.0/8.10.0) id f2TKTE600466; Thu, 29 Mar 2001 13:29:14 -0700 Date: Thu, 29 Mar 2001 13:29:14 -0700 Message-Id: <200103292029.f2TKTE600466@mobilix.ras.ucalgary.ca> From: Richard Gooch To: Piete Brooks Cc: devfs@oss.sgi.com Subject: Re: Newbie questions: Auto creating devices ? In-Reply-To: References: Sender: owner-devfs@oss.sgi.com Precedence: bulk Piete Brooks writes: > I've not received any replies to my earlier email :-( Speaking for myself, my life has been a mess (travel, moving house, sick with 'flu), so I haven't been able to reply. I don't recall an answer to this, so here I go: > I've got further problems trying to access a SCSI tape changer. > I need to modprobe st and sg to make the devices appear. This is > fine for a while, but the user reports that the devices `disappear'. > I assume others must have this working properly -- can they send me > details of how to configure it ? Ta. My guess is that you have a cron job which is regularly unloading autoloaded modules. > It mostly works, but there are a few remaining problems. > I've read http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html and > am none the wiser. I'm not sure what `man devfsd' means by "old > compatibility entries" and "new compatibility entries". Are there > other docs out there ? Are there any sample config files I can look > at ? Old compatibility names are /dev/hda, /dev/sda, /dev/rtc and so on. These are the legacy names. I've added some text to my master copy of the FAQ to explain this. New compatibility entries are (as the FAQ explains) convenience or shorthand entries. The raw kernel-supplied names are a bit verbose, so a shorthand variation is provided for those who don't like typing (like me). > I was assuming that there would be something I could put in > devfsd.conf to say `create a link from /dev/mouse to ttys/0' (I know > some people don't like /dev/mouse, but we use it!), rather than > having use the tarball approach. Can this be done ? No. Devfsd is event/action based. There isn't a "startup" event, and I don't see much point. You could just as well write a script. What I plan on doing at some point is to leverage the COPY action so that manually created device nodes which have been saved in the database (i.e. /dev-state/) will be copied into devfs. Thus, the following sequence would be supported: # ln -s tts/0 /dev/mouse (devfs sends CREATE event to devfsd) (devfsd copies node to /dev-state) # reboot (devfsd reads /dev-state and copies back to devfs) > The latest problem is that in the old world, when a user tried to > open /dev/audio, kmod loaded the driver and it all worked. Now > there is no /dev/audio to trigger kmod, and just attempting to open > the name /dev/audio doesn't work. Manually doing a modprobe works > and causes /dev/audio to appear, but with the wrong modes -- > likewise /dev/cdroms/ is > drw------- and even the `owner' can't access /dev/cdrom > How should it all work ? You need to configure /dev/sound to load the appropriate sound driver. See the modules.devfs file provided with devfsd. Regards, Richard.... Permanent: rgooch@atnf.csiro.au Current: rgooch@ras.ucalgary.ca