Re: replacing makedev

2002-07-07 Thread Andres Salomon
We reimplement it because we have different needs. For example, the one I'm working on has the following bit of code: ext = strrchr (file->d_name, '.'); if (ext == NULL) read_file (file->d_name); else if (strcmp (++ext, os) == 0) read_file (file->d_name); where 'os' defaults to l

RE: replacing makedev

2002-07-07 Thread Sean 'Shaleh' Perry
On 07-Jul-2002 Andres Salomon wrote: > I've started work on this, but I figured I'd shoot an email to the list > for suggestions/comments. The current makedev script (/sbin/MAKEDEV) is > rather lacking in a few respects: > If you are going to do this, how about doing it seriously. Contact the

Re: replacing makedev

2002-07-07 Thread elf
Fair enough. Really, the point is to know what they did, reuse the good and redo the bad. On Sun, Jul 07, 2002 at 07:39:03PM -0400, Andres Salomon wrote: > It's only 800 or so lines; it's pretty basic. Basing it off redhat > isn't really necessary. There's also a bit of cruft in the redhat > ve

Re: replacing makedev

2002-07-07 Thread Andres Salomon
It's only 800 or so lines; it's pretty basic. Basing it off redhat isn't really necessary. There's also a bit of cruft in the redhat version. I'd end up stripping out stuff, changing stuff, etc; it would get to the point where I'd have been better off just starting from scratch. On Sun, Jul 07,

Re: replacing makedev

2002-07-07 Thread elf
If RH already uses /etc/makedev.d, why not start with their application? On Sun, Jul 07, 2002 at 06:16:04PM -0400, Andres Salomon wrote: > Looking at redhat's makedev, they have device nodes in /etc/makedev.d, > so that packages can simply add files to that directory to create new > devices. This

replacing makedev

2002-07-07 Thread Andres Salomon
I've started work on this, but I figured I'd shoot an email to the list for suggestions/comments. The current makedev script (/sbin/MAKEDEV) is rather lacking in a few respects: 1) It does a nasty 'eval "major_$device=$major"', where $device and $major come from /proc/devices, for every single de