Diff for /src/sys/dev/misc/streams/Attic/streams.c between versions 1.11 and 1.12

version 1.11, 2004/05/13 23:49:17 version 1.12, 2004/05/19 22:52:44
Line 96  enum { Line 96  enum {
         dev_unix_ord_stream     = 40          dev_unix_ord_stream     = 40
 };  };
   
 dev_t dt_ptm, dt_arp, dt_icmp, dt_ip, dt_tcp, dt_udp, dt_rawip,  
         dt_unix_dgram, dt_unix_stream, dt_unix_ord_stream;  
   
 static struct fileops svr4_netops = {  static struct fileops svr4_netops = {
         NULL,   /* port */          NULL,   /* port */
         NULL,   /* clone */          NULL,   /* clone */
Line 140  streams_modevent(module_t mod, int type, Line 137  streams_modevent(module_t mod, int type,
         switch (type) {          switch (type) {
         case MOD_LOAD:          case MOD_LOAD:
                 /* XXX should make sure it isn't already loaded first */                  /* XXX should make sure it isn't already loaded first */
                 dt_ptm = make_dev(&streams_cdevsw, dev_ptm, 0, 0, 0666,                  cdevsw_add(&streams_cdevsw, 0, 0);
                         "ptm");                  make_dev(&streams_cdevsw, dev_ptm, 0, 0, 0666, "ptm");
                 dt_arp = make_dev(&streams_cdevsw, dev_arp, 0, 0, 0666,                  make_dev(&streams_cdevsw, dev_arp, 0, 0, 0666, "arp");
                         "arp");                  make_dev(&streams_cdevsw, dev_icmp, 0, 0, 0666, "icmp");
                 dt_icmp = make_dev(&streams_cdevsw, dev_icmp, 0, 0, 0666,                  make_dev(&streams_cdevsw, dev_ip, 0, 0, 0666, "ip");
                         "icmp");                  make_dev(&streams_cdevsw, dev_tcp, 0, 0, 0666, "tcp");
                 dt_ip = make_dev(&streams_cdevsw, dev_ip, 0, 0, 0666,                  make_dev(&streams_cdevsw, dev_udp, 0, 0, 0666, "udp");
                         "ip");                  make_dev(&streams_cdevsw, dev_rawip, 0, 0, 0666, "rawip");
                 dt_tcp = make_dev(&streams_cdevsw, dev_tcp, 0, 0, 0666,                  make_dev(&streams_cdevsw, dev_unix_dgram, 0, 0, 0666, "ticlts");
                         "tcp");                  make_dev(&streams_cdevsw, dev_unix_stream, 
                 dt_udp = make_dev(&streams_cdevsw, dev_udp, 0, 0, 0666,  
                         "udp");  
                 dt_rawip = make_dev(&streams_cdevsw, dev_rawip, 0, 0, 0666,  
                         "rawip");  
                 dt_unix_dgram = make_dev(&streams_cdevsw, dev_unix_dgram,  
                         0, 0, 0666, "ticlts");  
                 dt_unix_stream = make_dev(&streams_cdevsw, dev_unix_stream,  
                         0, 0, 0666, "ticots");                          0, 0, 0666, "ticots");
                 dt_unix_ord_stream = make_dev(&streams_cdevsw,                  make_dev(&streams_cdevsw, dev_unix_ord_stream, 
                         dev_unix_ord_stream, 0, 0, 0666, "ticotsord");                          0, 0, 0666, "ticotsord");
   
                 if (! (dt_ptm && dt_arp && dt_icmp && dt_ip && dt_tcp &&  
                                 dt_udp && dt_rawip && dt_unix_dgram &&  
                                 dt_unix_stream && dt_unix_ord_stream)) {  
                         printf("WARNING: device config for STREAMS failed\n");  
                         printf("Suggest unloading streams KLD\n");  
                 }  
                 return 0;                  return 0;
         case MOD_UNLOAD:          case MOD_UNLOAD:
                 /* XXX should check to see if it's busy first */                  /* XXX should check to see if it's busy first */
                 destroy_dev(dt_ptm);                  cdevsw_remove(&streams_cdevsw, 0, 0);
                 destroy_dev(dt_arp);  
                 destroy_dev(dt_icmp);  
                 destroy_dev(dt_ip);  
                 destroy_dev(dt_tcp);  
                 destroy_dev(dt_udp);  
                 destroy_dev(dt_rawip);  
                 destroy_dev(dt_unix_dgram);  
                 destroy_dev(dt_unix_stream);  
                 destroy_dev(dt_unix_ord_stream);  
   
                 return 0;                  return 0;
         default:          default:

Removed from v.1.11  
changed lines
  Added in v.1.12