Exemplo n.º 1
0
Arquivo: ne.c Projeto: rroart/freevms
long er_iodb_vmsinit(long dev)
{
#if 0
    struct _ucb * ucb=&er$ucb;
    struct _ddb * ddb=&er$ddb;
    struct _crb * crb=&er$crb;
#endif
    struct _ucb * ucb=kmalloc(sizeof(struct _ucbnidef),GFP_KERNEL);
    struct _ddb * ddb=kmalloc(sizeof(struct _ddb),GFP_KERNEL);
    struct _crb * crb=kmalloc(sizeof(struct _crb),GFP_KERNEL);
    unsigned long idb=0,orb=0;

    memset(ucb,0,sizeof(struct _ucbnidef));
    memset(ddb,0,sizeof(struct _ddb));
    memset(crb,0,sizeof(struct _crb));

#if 0
    init_ddb(&er$ddb,&er$ddt,&er$ucb,"dqa");
    init_ucb(&er$ucb, &er$ddb, &er$ddt, &er$crb);
    init_crb(&er$crb);
#endif

    ucb -> ucb$w_size = sizeof(struct _ucbnidef); // temp placed
    ((struct _ucbnidef *)ucb)->ucb$l_extra_l_1=dev;

    init_ddb(ddb,&er$ddt,ucb,"era");
    init_ucb(ucb, ddb, &er$ddt, crb);
    init_crb(crb);

//  ioc_std$clone_ucb(&er$ucb,&ucb);
    er$init_tables();
    er$struc_init (crb, ddb, idb, orb, ucb);
    er$struc_reinit (crb, ddb, idb, orb, ucb);
    er$unit_init (idb, ucb);

    insertdevlist(ddb);

    return ddb;

}
Exemplo n.º 2
0
long ft_iodb_vmsinit(void)
{
#if 0
    struct _ucb * ucb=&ft$ucb;
    struct _ddb * ddb=&ft$ddb;
    struct _crb * crb=&ft$crb;
#endif
    struct _ucb * ucb=kmalloc(sizeof(struct _ft_ucb),GFP_KERNEL);
    struct _ddb * ddb=kmalloc(sizeof(struct _ddb),GFP_KERNEL);
    struct _crb * crb=kmalloc(sizeof(struct _crb),GFP_KERNEL);
    unsigned long idb=0,orb=0;

    memset(ucb,0,sizeof(struct _ft_ucb));
    memset(ddb,0,sizeof(struct _ddb));
    memset(crb,0,sizeof(struct _crb));

#if 0
    init_ddb(&ft$ddb,&ft$ddt,&ft$ucb,"dqa");
    init_ucb(&ft$ucb, &ft$ddb, &ft$ddt, &ft$crb);
    init_crb(&ft$crb);
#endif

    ucb -> ucb$w_size = sizeof(struct _ft_ucb); // temp placed

    init_ddb(ddb,&ft$ddt,ucb,"fta");
    init_ucb(ucb, ddb, &ft$ddt, crb);
    init_crb(crb);

//  ioc_std$clone_ucb(&ft$ucb,&ucb);
    ft$init_tables();
    ft$struc_init (crb, ddb, idb, orb, ucb);
    ft$struc_reinit (crb, ddb, idb, orb, ucb);
    ft$unit_init (idb, ucb);

    insertdevlist(ddb);

    return ddb;

}
Exemplo n.º 3
0
long kbd_iodb_vmsinit(void) {
#if 0
  struct _ucb * ucb=&kb$ucb;
  struct _ddb * ddb=&kb$ddb;
  struct _crb * crb=&kb$crb;
#endif 
  struct _ucb * ucb=kmalloc(sizeof(struct _ucb),GFP_KERNEL);
  struct _ddb * ddb=kmalloc(sizeof(struct _ddb),GFP_KERNEL);
  struct _crb * crb=kmalloc(sizeof(struct _crb),GFP_KERNEL);
  unsigned long idb=0,orb=0;

  bzero(ucb,sizeof(struct _ucb));
  bzero(ddb,sizeof(struct _ddb));
  bzero(crb,sizeof(struct _crb));

#if 0
  init_ddb(&kb$ddb,&kb$ddt,&kb$ucb,"dqa");
  init_ucb(&kb$ucb, &kb$ddb, &kb$ddt, &kb$crb);
  init_crb(&kb$crb);
#endif

  init_ddb(ddb,&kb$ddt,ucb,"opa");
  init_ucb(ucb, ddb, &kb$ddt, crb);
  init_crb(crb);

//  ioc_std$clone_ucb(&kb$ucb,&ucb);
  kb$init_tables();
  kb$struc_init (crb, ddb, idb, orb, ucb);
  kb$struc_reinit (crb, ddb, idb, orb, ucb);
  kb$unit_init (idb, ucb);

  insertdevlist(ddb);

  return ddb;

}