2.1.0 -> 2.2.5: i386/i386/conf.c is gone, what do I need to do for local device?

2.1.0 -> 2.2.5: i386/i386/conf.c is gone, what do I need to do for local device?

Post by Greg Moncreaf » Wed, 19 Nov 1997 04:00:00



--
==============================================================

Raytheon Electronic Systems             1-508-490-2086 (Phax)

->"this is my personal opinion and not that of my employer."<-

 
 
 

2.1.0 -> 2.2.5: i386/i386/conf.c is gone, what do I need to do for local device?

Post by J Wuns » Mon, 24 Nov 1997 04:00:00


(Please, don't use overly long subject lines)

Have a look at the existing drivers.  Drivers are now supposed to
claim their cdevsw[] entry in an initialization routine.  The typical
sequence is below (quoted from the lpt driver).  Note that most of the
static assignments for major numbers are supposed to go away once
DEVFS is fully functional.

static  d_open_t        lptopen;
static  d_close_t       lptclose;
static  d_write_t       lptwrite;
static  d_ioctl_t       lptioctl;

#define CDEV_MAJOR 16
static struct cdevsw lpt_cdevsw =
        { lptopen,      lptclose,       noread,         lptwrite,       /*16*/
          lptioctl,     nullstop,       nullreset,      nodevtotty,/* lpt */
          seltrue,      nommap,         nostrat,        "lpt",        NULL,   -1 };

...
#ifdef DEVFS
        /* XXX what to do about the flags in the minor number? */
        sc->devfs_token = devfs_add_devswf(&lpt_cdevsw,
                unit, DV_CHR,
                UID_ROOT, GID_WHEEL, 0600, "lpt%d", unit);
        sc->devfs_token_ctl = devfs_add_devswf(&lpt_cdevsw,
                unit | LP_BYPASS, DV_CHR,
                UID_ROOT, GID_WHEEL, 0600, "lpctl%d", unit);
#endif
...
static lpt_devsw_installed = 0;

static void     lpt_drvinit(void *unused)
{
        dev_t dev;

        if( ! lpt_devsw_installed ) {
                dev = makedev(CDEV_MAJOR, 0);
                cdevsw_add(&dev,&lpt_cdevsw, NULL);
                lpt_devsw_installed = 1;
        }

Quote:}

SYSINIT(lptdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,lpt_drvinit,NULL)

--
cheers, J"org


Never trust an operating system you don't have sources for. ;-)

 
 
 

1. Downloading RH7...So many types: 7.0-i386...7.0-i386-respin...7.0-ja-i386

Hya,

I was going to download RedHat 7.0.  But since it's a long download.  I
want to make sure I download what is the best.  I see that there are
three types of ISO's:

  7.0-i386-docs-8bit.iso
  7.0-i386-powertools.iso
  7.0-i386-respin-SRPMS.iso
  7.0-i386-respin-disc1.iso
  7.0-i386-respin-disc2.iso
  7.0-i386-upgrade.iso
  7.0-ja-i386-SRPMS.iso
  7.0-ja-i386-disc1.iso
  7.0-ja-i386-disc2.iso

Which one do you guys recommend?  I want the most updated one.  Would
that be the "ja's" or the "respin's."

Thanks...

Raul Trujillo

2. Day Light Saving

3. FW: i386 Linux kernel DoS

4. mod_timer fxi for sch_csz.c

5. for 2.2.x i386 Linux kernel DoS - Affects 2.2.x and probably 2.0.x

6. no color in Netscape buttons

7. i386 linux kernel proof-of-concept DoS

8. Conexant HCF modem drivers..

9. FW: i386 Linux kernel DoS (clarification)

10. FW: i386 Linux kernel DoS - Affects 2.2.x and probably 2.0.x

11. RH6.0 - i386-glibc20-linux-gcc or i386-redhat-linux-gcc

12. newbie question about RH contrib/i386, contrib/hurricane/i386

13. elf32-i386 and a.out-i386-linux