if_ct.c (130585) | if_ct.c (130640) |
---|---|
1/* 2 * Cronyx-Tau adapter driver for FreeBSD. 3 * Supports PPP/HDLC and Cisco/HDLC protocol in synchronous mode, 4 * and asyncronous channels with full modem control. 5 * Keepalive protocol implemented in both Cisco and PPP modes. 6 * 7 * Copyright (C) 1994-2002 Cronyx Engineering. 8 * Author: Serge Vakulenko, <vak@cronyx.ru> --- 7 unchanged lines hidden (view full) --- 16 * Authors grant any other persons or organisations a permission to use, 17 * modify and redistribute this software in source and binary forms, 18 * as long as this message is kept with the software, all derivative 19 * works or modified versions. 20 * 21 * Cronyx Id: if_ct.c,v 1.1.2.22 2004/02/26 19:06:51 rik Exp $ 22 */ 23#include <sys/cdefs.h> | 1/* 2 * Cronyx-Tau adapter driver for FreeBSD. 3 * Supports PPP/HDLC and Cisco/HDLC protocol in synchronous mode, 4 * and asyncronous channels with full modem control. 5 * Keepalive protocol implemented in both Cisco and PPP modes. 6 * 7 * Copyright (C) 1994-2002 Cronyx Engineering. 8 * Author: Serge Vakulenko, <vak@cronyx.ru> --- 7 unchanged lines hidden (view full) --- 16 * Authors grant any other persons or organisations a permission to use, 17 * modify and redistribute this software in source and binary forms, 18 * as long as this message is kept with the software, all derivative 19 * works or modified versions. 20 * 21 * Cronyx Id: if_ct.c,v 1.1.2.22 2004/02/26 19:06:51 rik Exp $ 22 */ 23#include <sys/cdefs.h> |
24__FBSDID("$FreeBSD: head/sys/dev/ctau/if_ct.c 130585 2004-06-16 09:47:26Z phk $"); | 24__FBSDID("$FreeBSD: head/sys/dev/ctau/if_ct.c 130640 2004-06-17 17:16:53Z phk $"); |
25 26#include <sys/param.h> 27 28#if __FreeBSD_version >= 500000 29# define NCTAU 1 30#else 31# include "ctau.h" 32#endif --- 2591 unchanged lines hidden (view full) --- 2624#else /* __FreeBSD_version >= 400000 */ 2625static int ct_modevent (module_t mod, int type, void *unused) 2626{ 2627 struct cdev *dev; 2628 static int load_count = 0; 2629 struct cdevsw *cdsw; 2630 2631#if __FreeBSD_version >= 502103 | 25 26#include <sys/param.h> 27 28#if __FreeBSD_version >= 500000 29# define NCTAU 1 30#else 31# include "ctau.h" 32#endif --- 2591 unchanged lines hidden (view full) --- 2624#else /* __FreeBSD_version >= 400000 */ 2625static int ct_modevent (module_t mod, int type, void *unused) 2626{ 2627 struct cdev *dev; 2628 static int load_count = 0; 2629 struct cdevsw *cdsw; 2630 2631#if __FreeBSD_version >= 502103 |
2632 dev = udev2dev (makeudev(CDEV_MAJOR, 0)); | 2632 dev = findcdev (makedev(CDEV_MAJOR, 0)); |
2633#else 2634 dev = makedev (CDEV_MAJOR, 0); 2635#endif 2636 switch (type) { 2637 case MOD_LOAD: | 2633#else 2634 dev = makedev (CDEV_MAJOR, 0); 2635#endif 2636 switch (type) { 2637 case MOD_LOAD: |
2638 if (dev != NODEV && | 2638 if (dev != NULL && |
2639 (cdsw = devsw (dev)) && 2640 cdsw->d_maj == CDEV_MAJOR) { 2641 printf ("Tau-ISA driver is already in system\n"); 2642 return (ENXIO); 2643 } 2644#if __FreeBSD_version >= 500000 && defined NETGRAPH 2645 if (ng_newtype (&typestruct)) 2646 printf ("Failed to register ng_ct\n"); --- 99 unchanged lines hidden --- | 2639 (cdsw = devsw (dev)) && 2640 cdsw->d_maj == CDEV_MAJOR) { 2641 printf ("Tau-ISA driver is already in system\n"); 2642 return (ENXIO); 2643 } 2644#if __FreeBSD_version >= 500000 && defined NETGRAPH 2645 if (ng_newtype (&typestruct)) 2646 printf ("Failed to register ng_ct\n"); --- 99 unchanged lines hidden --- |